bug #73 [lexik/jwt-authentication-bundle] Fix configured key path (chalasr)

This PR was merged into the master branch.

Discussion
----------

[lexik/jwt-authentication-bundle] Fix configured key path

Only using `%ETC_DIR%` leads to

> Private key "etc/jwt/private.pem" does not exist or is not readable.

This fixes it by prefixing paths by `%kernel.project_dir%/` in the bundle config.

Commits
-------

7f5180d [lexik/jwt-authentication-bundle] Fix configured key path
This commit is contained in:
Fabien Potencier
2017-05-24 08:11:00 +02:00
2 changed files with 3 additions and 2 deletions
@@ -1,4 +1,4 @@
lexik_jwt_authentication:
private_key_path: '%env(JWT_PRIVATE_KEY_PATH)%'
public_key_path: '%env(JWT_PUBLIC_KEY_PATH)%'
private_key_path: '%kernel.project_dir%/%env(JWT_PRIVATE_KEY_PATH)%'
public_key_path: '%kernel.project_dir%/%env(JWT_PUBLIC_KEY_PATH)%'
pass_phrase: '%env(JWT_PASSPHRASE)%'
@@ -7,6 +7,7 @@
},
"aliases": ["jwt-auth"],
"env": {
"#1": "Key paths should be relative to the project directory",
"JWT_PRIVATE_KEY_PATH": "%ETC_DIR%/jwt/private.pem",
"JWT_PUBLIC_KEY_PATH": "%ETC_DIR%/jwt/public.pem",
"JWT_PASSPHRASE": "%generate(secret)%"