Exemplo n.º 1
0
 private function getKey()
 {
     if (!AppConfig::isDefined('security.jwt_key')) {
         throw new JwtKeyNotConfiguredException($this->translator->tr(self::JWT_KEY_NOT_CONFIGURED));
     }
     return AppConfig::get('security.jwt_key');
 }
Exemplo n.º 2
0
 public function getFieldParameters()
 {
     $fields = array();
     $path = "entities." . ucfirst($this->tableName) . ".fields";
     if (AppConfig::isDefined($path)) {
         $fields = AppConfig::get($path);
     }
     return $fields;
 }
Exemplo n.º 3
0
 public static function getClass()
 {
     if (AppConfig::isDefined('security.authentication')) {
         $auth = AppConfig::get('security.authentication');
         if ('jwt' === $auth) {
             return self::JWT;
         } elseif ('session' === $auth) {
             return self::SESSION;
         }
         throw new AuthenticatorUnknownException("The authenticator \"{$auth}\" is unknown.");
     } else {
         return self::SESSION;
     }
 }