LexikJWTBundle не распознает действительные ключи конфигурации

Я получаю следующую ошибку, используя 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%'

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

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

person broswilli    schedule 27.06.2018    source источник


Ответы (1)


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

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%'
person broswilli    schedule 27.06.2018
comment
Документация не является неправильной, вы смотрите документацию основной ветки. Внесены изменения для версии - person Iwan Wijaya; 28.06.2018