Hi,
As a health locker, we will be storing the user’s auth token that is obtained when user approves an authorization request. In the approve auth payload, we are sending the "generatePerpetualToken": true
{
"generatePerpetualToken": true
}
Upon this, we are receiving the payload of /v0.5/users/auth/notify
callback which has the token to be used for linking and approving consents on user’s behalf.
But when checked the details of the token on jwt.io , we are seeing that the token is having validity of only 24h whereas it should have been of 1 year as per the payload -> "expiry": "2023-05-24T13:08:51.923599",
Payload
{
"requestId": "42e77c05-4be5-4b7f-b66d-2dc59972825d",
"timestamp": "2022-05-24T13:08:51.923686",
"auth": {
"transactionId": "ee248e6a-3395-4d57-96b1-160bcf3f099e",
"status": "GRANTED",
"accessToken": "eyJhbGciOiJSUzUxMiJ9.eyJzdWIiOiJib2J0aGVidWlsZGVyQHNieCIsInJlcXVlc3RlclR5cGUiOiJISVAiLCJyZXF1ZXN0ZXJJZCI6IkVLQV9ISVAiLCJwYXRpZW50SWQiOiJib2J0aGVidWlsZGVyQHNieCIsInNlc3Npb25JZCI6ImUxZDRiZmFkLWM4ZjYtNGE5MC1hZTMxLWYyYWU4OTZkODZhMiIsImV4cCI6MTY1MzQ4NDEzMSwiaWF0IjoxNjUzMzk3NzMxfQ.iHIfo0r7H_bv3LNpLfwg28YSoh3O8a5WI4RGNxxmF0xKXe5AEedsMEvd41pWS142KRDR0Mir1NMbTTjXypmgoSaQD1wXE9BeRRJLklb-spoEjtjTB-FyBtM8PUiNBG8ar4M1E427jS4PNgTaw0XogXFDdK50H2xTLG6fqSxPr1XdVmB8xcJLKaTof42n1V1G7Bex2WJlaHe1CbiDrLhc5EbhIGrEwyV9bqJdaY3suJkRSN_xDnQvfAxtR6z3oGK9YxBtU9-B7k8t58iB2i29ktazuS8-uBXSJ_glbc6m_GOwPCXsraECuHuoq_4N3yJ6CcQSz_s5Ok6ldxKxoHgNVQ",
"validity": {
"purpose": "KYC_AND_LINK",
"requester": {
"type": "HIP",
"id": "EKA_HIP",
"name": null
},
"expiry": "2023-05-24T13:08:51.923599",
"limit": 1
},
"patient": {
"id": "bobthebuilder@sbx",
"name": "Ayush Kumar",
"gender": "M",
"yearOfBirth": 199X,
"address": {
"line": null,
"district": "XXXX",
"state": "XXXX",
"pincode": null
},
"healthIdNumber": null,
"identifiers": [
{
"type": "MOBILE",
"value": "+91-99705XXXXX"
}
]
}
}
}
Decoded token
{
"sub": "bobthebuilder@sbx",
"requesterType": "HIP",
"requesterId": "EKA_HIP",
"patientId": "bobthebuilder@sbx",
"sessionId": "e1d4bfad-c8f6-4a90-ae31-f2ae896d86a2",
"exp": 1653484131, // May 25, 2022
"iat": 1653397731 // May 24, 2022
}