Develop'ER
Develop'ER

Reputation: 41

JWT tokens with different expiration times based on user roles in Symfony

I'm working on a Symfony project where I handle authentication using JWT tokens, generated with the LexikJWTAuthenticationBundle. I need to create tokens with different expiration times depending on the user's role. Specifically:

I've already configured the bundle and it works well with a fixed token_ttl, but I haven't found a way to dynamically adjust the token's lifetime based on the user's role.

Upvotes: 0

Views: 22

Answers (0)

Related Questions