Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/symfony/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Symfony LexikJWTBundle无法识别有效的配置密钥_Symfony_Jwt_Symfony 3.3_Lexikjwtauthbundle - Fatal编程技术网

Symfony LexikJWTBundle无法识别有效的配置密钥

Symfony LexikJWTBundle无法识别有效的配置密钥,symfony,jwt,symfony-3.3,lexikjwtauthbundle,Symfony,Jwt,Symfony 3.3,Lexikjwtauthbundle,我使用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_pub

我使用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%'
和parameters.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

我找到了这个问题的答案

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%'

文档没有错,您正在查看主分支文档。