Gdn::authenticator PHP Method

authenticator() public static method

public static authenticator ( ) : Gdn_Auth
return Gdn_Auth
    public static function authenticator()
    {
        return self::factory(self::AliasAuthenticator);
    }

Usage Example

示例#1
0
 public function startAuthenticator()
 {
     if (!c('Garden.Installed', false)) {
         return;
     }
     // Start the 'session'
     Gdn::session()->start(false, false);
     // Get list of enabled authenticators
     $AuthenticationSchemes = Gdn::config('Garden.Authenticator.EnabledSchemes', array());
     // Bring all enabled authenticator classes into the defined scope to allow them to be picked up by the plugin manager
     foreach ($AuthenticationSchemes as $AuthenticationSchemeAlias) {
         $Registered = $this->registerAuthenticator($AuthenticationSchemeAlias);
     }
     $this->_Started = true;
     $this->wakeUpAuthenticators();
     if (Gdn::session()->isValid() && !Gdn::session()->checkPermission('Garden.SignIn.Allow')) {
         return Gdn::authenticator()->authenticateWith('user')->deauthenticate();
     }
 }
All Usage Examples Of Gdn::authenticator