I am trying to put a JWT Auth to access my API : /api/docs But I am currently getting an error while trying to get the token with this command :
curl -X POST -H "Content-Type: application/json" http://localhost/login_check -d '{"username":"johndoe","password":"test"}'
Of course I replace username and password
Signature key "/var/www/config/jwt/private.pem" does not exist or is not readable. Did you correctly set the "lexik_jwt_authentication.signature_key" configuration key? (500 Internal Server Error)
security.yaml
firewalls:
login:
pattern: ^/login
stateless: true
anonymous: true
provider: fos_userbundle_2
json_login:
check_path: /login_check
username_path: username
password_path: password
success_handler:
lexik_jwt_authentication.handler.authentication_success
failure_handler:
lexik_jwt_authentication.handler.authentication_failure
main:
pattern: ^/
provider: fos_userbundle_2
stateless: true
anonymous: true
guard:
authenticators:
- lexik_jwt_authentication.jwt_token_authenticator
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
Signature key "/var/www/config/jwt/private.pem" does not exist or is not readable. Did you correctly set the "lexik_jwt_authentication.signature_key" configuration key? (500 Internal Server Error)