Skip to content

Commit 0876bc0

Browse files
author
jasonzhu
committed
fix: remove or logic in expires default value
1 parent ca11422 commit 0876bc0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

apisix/plugins/authz-keycloak.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -319,15 +319,15 @@ end
319319

320320
-- Return access_token expires_in value (in seconds).
321321
local function authz_keycloak_access_token_expires_in(conf, expires_in)
322-
return (expires_in or conf.access_token_expires_in or 300)
323-
- 1 - (conf.access_token_expires_leeway or 0)
322+
return (expires_in or conf.access_token_expires_in)
323+
- 1 - (conf.access_token_expires_leeway)
324324
end
325325

326326

327327
-- Return refresh_token expires_in value (in seconds).
328328
local function authz_keycloak_refresh_token_expires_in(conf, expires_in)
329-
return (expires_in or conf.refresh_token_expires_in or 3600)
330-
- 1 - (conf.refresh_token_expires_leeway or 0)
329+
return (expires_in or conf.refresh_token_expires_in)
330+
- 1 - (conf.refresh_token_expires_leeway)
331331
end
332332

333333

0 commit comments

Comments
 (0)