Skip to content

Commit cf40c8e

Browse files
committed
Revert max_auth_change
1 parent 4e1ac93 commit cf40c8e

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/lua/api-gateway/validation/oauth2/oauthTokenValidator.lua

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,7 @@ function _M:extractContextVars(tokenInfo)
143143
cachingObj.oauth_token_scope = tokenInfo.token.scope
144144
cachingObj.oauth_token_client_id = tokenInfo.token.client_id
145145
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
146+
cachingObj.oauth_token_expires_at = tokenInfo.expires_at -- NOTE: Assumption: value in ms
151147
return cachingObj
152148
end
153149

0 commit comments

Comments
 (0)