Forum Discussion
Madhu_Rajagopal
Jan 12, 2017Employee
It is possible to modify the timeout once a token is obtained. This is achieved using the PATCH method.
Get a token (from a external auth provider in this example):
curl -s -k -u admin:changeme -X POST -H "Content-Type: application/json" -d '{ "username": "mrajagopal", "password": "changeme1234", "loginProviderName": "tmos"}' https://10.154.170.18/mgmt/shared/authn/login
Update the token with preferred timeout (max: 36000) value using the self-link key provided in the response:
curl -sk https://10.154.170.18/mgmt/shared/authz/tokens/Y43RS3JJLFXFH3FRT4PVZQOUOJ -H "X-F5-Auth-Token: Y43RS3JJLFXFH3FRT4PVZQOUOJ" -X PATCH -d '{"timeout" : 4200}'
The 'lastUpdateMicros' key in the response is the unix timestamp of when this token was modified as we did to adjust the timeout.
While the 'expirationMicros' key is the unix timestamp of when this token will expire.
- SupportUserAug 16, 2023Nimbostratus
posted by mistake - please delete