LexikJWTBundle не распознает действительные ключи конфигурации - PullRequest
0 голосов
/ 27 июня 2018

Я получаю следующую ошибку, используя lexikjwtauthenticationBundle

Unrecognized options "secret_key, public_key" under "lexik_jwt_authentication"

Моя конфигурация похожа на

lexik_jwt_authentication:
secret_key:       '%jwt_private_key_path%' # required for token creation
public_key:       '%jwt_public_key_path%'  # required for token verification
pass_phrase:      '%jwt_key_pass_phrase%'  # required for token creation
token_ttl:        '%jwt_token_ttl%'

И параметры.имл имеет следующие параметры

jwt_private_key_path: '%kernel.root_dir%/config/jwt/private.pem'
jwt_public_key_path: '%kernel.root_dir%/config/jwt/public.pem'
jwt_key_pass_phrase: '*******'
jwt_token_ttl: 3600

1 Ответ

0 голосов
/ 28 июня 2018

Мне удалось найти ответ на вопрос.

lexik_jwt_authentication:
  secret_key:       '%jwt_private_key_path%' # required for token creation
  public_key:       '%jwt_public_key_path%'  # required for token verification
  pass_phrase:      '%jwt_key_pass_phrase%'  # required for token creation
  token_ttl:        '%jwt_token_ttl%'

Правильная конфигурация:

lexik_jwt_authentication:
  private_key_path: '%jwt_private_key_path%' # required for token creation
  public_key_path: '%jwt_public_key_path%'  # required for token verification
  pass_phrase: '%jwt_key_pass_phrase%'  # required for token creation
  token_ttl: '%jwt_token_ttl%'
...