Last active
February 28, 2016 19:53
-
-
Save andevsoftware/a3515c48cbbc7b1718fb to your computer and use it in GitHub Desktop.
Phalcon REST - Authentication manager register
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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