Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save andevsoftware/a3515c48cbbc7b1718fb to your computer and use it in GitHub Desktop.
Save andevsoftware/a3515c48cbbc7b1718fb to your computer and use it in GitHub Desktop.
Phalcon REST - Authentication manager register
<?php
/**
* @description Phalcon - AuthManager
*/
$di->setShared(AppServices::AUTH_MANAGER, function () use ($di, $config) {
$authManager = new \PhalconRest\Auth\Manager($config->authentication->expirationTime);
$authManager->registerAccountType(App\Auth\UsernameAccountType::NAME, new \App\Auth\UsernameAccountType());
return $authManager;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment