Apigee Microgateway Oauth Token expiry time

Not applicable

token that is generated from https://{org.apigee.com}/edgemicro-auth/token

has a expiry time of 1799 seconds but value of token_expiry is 300 in Create-Oauth_Request.xml

file <AssignVariable> <Name>token_expiry</Name> <Value>300</Value> </AssignVariable>

So Where token_expiry time of 1799 has been set and what is the procedure of increasing the time limit.

FYI microgateway version is 2.5.16

0 4 371
4 REPLIES 4

Former Community Member
Not applicable

The right place to increase the expiry is change the value of the variable. Is that not working? We recently had a bug in the proxy and that has since been fixed. If you are upgrading the proxy, here are the steps:

upgrade to latest edgemicro or to a specific version:

npm install -g edgemicro
npm install -g edgemicro@2.5.16

upgrade the proxy

edgemicro upgradeauth

Currently token expiry time is 1799 seconds so where this value is coming from. There is no such mention in docs also and in Createouthrequesy.xml file default value of token_expiry is 300

What is the correct file to change a value. I am seeing the value of token_expiry in microgateway-edgeauth/apiproxy/policies/ Create-Oauth-Request.xml file.Is this the correct file to change or there is some other file?

@srinandans

as per your answer in https://community.apigee.com/questions/51050/change-jwt-expiration-interval-in-edgemicro-oauth.html we can change the token_expiry time in Create-oauth request policy but in my case i am able to change token time in the expiresIn value in Generate-Access-Token.xml policy. so what is the differentiate between them?