We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4e1ac93 commit cf40c8eCopy full SHA for cf40c8e
1 file changed
src/lua/api-gateway/validation/oauth2/oauthTokenValidator.lua
@@ -143,11 +143,7 @@ function _M:extractContextVars(tokenInfo)
143
cachingObj.oauth_token_scope = tokenInfo.token.scope
144
cachingObj.oauth_token_client_id = tokenInfo.token.client_id
145
cachingObj.oauth_token_user_id = tokenInfo.token.user_id
146
- local oauth_token_expires_at = tokenInfo.expires_at
147
- if ngx.var.max_auth_local_cache_ttl ~= nil and ngx.var.max_auth_local_cache_ttl ~= '' then
148
- oauth_token_expires_at = math.min(oauth_token_expires_at, ngx.var.max_auth_local_cache_ttl * 1000)
149
- end
150
- cachingObj.oauth_token_expires_at = oauth_token_expires_at
+ cachingObj.oauth_token_expires_at = tokenInfo.expires_at -- NOTE: Assumption: value in ms
151
return cachingObj
152
end
153
0 commit comments