Пример #1
0
 public function getCredentials()
 {
     $value = $this->getUserData('KurogoCredentialsCache');
     try {
         $credentials = Kurogo::decrypt($value);
     } catch (KurogoException $e) {
         $credentials = $value;
     }
     return $credentials;
 }
Пример #2
0
 public function getCredentials(AuthenticationAuthority $authority)
 {
     $value = null;
     if ($cache = Kurogo::arrayVal($_SESSION, 'KurogoCredentialsCache')) {
         $value = Kurogo::arrayVal($cache, $authority->getAuthorityIndex());
     }
     try {
         $credentials = Kurogo::decrypt($value);
     } catch (KurogoException $e) {
         $credentials = $value;
     }
     return $credentials;
 }