mobile api jwt token never expires

This commit is contained in:
Schneider Roland 2023-05-20 22:27:27 +02:00
parent c0a94750ea
commit 7d362ada87

View File

@ -47,7 +47,7 @@ class LoginController extends RestController
->permittedFor('customer')// Configures the audience (aud claim) ->permittedFor('customer')// Configures the audience (aud claim)
->identifiedBy('A989C57D19E2AF756BA9585AC4CFAF7974AE3D2BCA7CCA7307B39AB28CC7C2C8', true)// Configures the id (jti claim), replicating as a header item ->identifiedBy('A989C57D19E2AF756BA9585AC4CFAF7974AE3D2BCA7CCA7307B39AB28CC7C2C8', true)// Configures the id (jti claim), replicating as a header item
->issuedAt($time)// Configures the time that the token was issue (iat claim) ->issuedAt($time)// Configures the time that the token was issue (iat claim)
->expiresAt($time + $validFor)// Configures the expiration time of the token (exp claim) // ->expiresAt($time + $validFor)// Configures the expiration time of the token (exp claim)
->withClaim('uid', $form->getMobileDevice()->getId())// Configures a new claim, called "uid" ->withClaim('uid', $form->getMobileDevice()->getId())// Configures a new claim, called "uid"
->withClaim('cardId', $form->getMobileDevice()->card->number)// Configures a new claim, called "uid" ->withClaim('cardId', $form->getMobileDevice()->card->number)// Configures a new claim, called "uid"
->getToken($signer, $key); // Retrieves the generated token ->getToken($signer, $key); // Retrieves the generated token