Here is how I am generating a JWT token in my symfony application:
`public function createAccessToken(string $username, array $payload = []): array
{
$user = JWTUser::createFromPayload($username, $payload);
and it all worked fine, until I have the need to generate a JWT token with dynamic configurations. Is it possible to achieve this somehow, I could not find anything in the documentation. I want to be able to pass the secret_ket and public_key + pass_phase in runtime ?
Here is how I am generating a JWT token in my symfony application: `public function createAccessToken(string $username, array $payload = []): array { $user = JWTUser::createFromPayload($username, $payload);
I have set the configuration
lexik_jwt_authentication: secret_key: '%kernel.project_dir%/config/jwt/private.pem' public_key: '%kernel.project_dir%/config/jwt/public.pem' pass_phrase: '%env(JWT_PASSPHRASE)%' token_ttl: '%env(JWT_TTL)%'
and it all worked fine, until I have the need to generate a JWT token with dynamic configurations. Is it possible to achieve this somehow, I could not find anything in the documentation. I want to be able to pass the secret_ket and public_key + pass_phase in runtime ?
Ideas and workarounds are welcome :)