oauth 2.0 - How to auto refresh a token when user is active - Wso2 IS, API Manager -
i using wso2 api manager 1.9 , wso2 5.
i generating token
curl -k -d "grant_type=password&username=username@domain.com&password=password" -h "authorization: basic zmtvztdjnuvume8ytvvqmnphoerqv05svxu wytpmm0cynmlrbvpvthlhufplthlartzyohjlshnh, content-type: application/x-www-form-urlencoded" https://10.234.31.152:8245/token
response
{ "scope":"default", "token_type":"bearer", "expires_in":3600, "refresh_token":"42a354167211de45aca1b2ebacc27d24", "access_token":"266c3aabaad48a587a6b5145d4f5252" }
here expiry of token 3600 seconds. (it can configured.)
my requirement is:
token should not expired when user actively accessing apis,
token should expired if user idle 3600 seconds
application uses api should handle api expiration time.if token expired when user accessing api, need obtain new token using refresh token[1]
Comments
Post a Comment