-
-
Notifications
You must be signed in to change notification settings - Fork 617
Description
Hello.
I found a feature that allows you to use additional keys lexik_jwt_authentication.additional_public_keys. It turned out to be very useful for me. But I ran into a problem during use.
Previously, I always entered the usual secret key from the category of removable environments (in alternating sequence with the classic one). Just try using "additional public keys". Therefore, we receive a message stating that the Additional Public Key"***" does not exist or is not readable. Did you install the "lexik_jwt_authentication.additional_public_keys" configuration key correctly?
lexik_jwt_authentication:
secret_key: '%env(resolve:JWT_SECRET_KEY)%'
user_id_claim: user_id
encoder:
signature_algorithm: HS256
additional_public_keys:
- '%env(resolve:JWT_SECRET_KEY_SECONDARY)%'
After examining the code https://github.com/lexik/LexikJWTAuthenticationBundle/blame/3.x/Services/KeyLoader/AbstractKeyLoader.php#L49-L62 I have a question. Why is the key transfer not supported in the configuration, but only the path to the key file is supported? But in the case of secret_key, the transfer of the key directly is supported.
Thanks