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'); }
public function getFieldParameters() { $fields = array(); $path = "entities." . ucfirst($this->tableName) . ".fields"; if (AppConfig::isDefined($path)) { $fields = AppConfig::get($path); } return $fields; }
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; } }