jbampton commented on a change in pull request #3021:
URL: https://github.com/apache/apisix/pull/3021#discussion_r543275699
##########
File path: apisix/plugins/openid-connect.lua
##########
@@ -148,6 +150,13 @@ end
function _M.rewrite(plugin_conf, ctx)
local conf = core.table.clone(plugin_conf)
+
+ -- Previously, we multiple conf.timeout before storing it in etcd.
+ -- If the timeout is too large, we should not multiple it again.
Review comment:
```suggestion
-- If the timeout is too large, we should not multiply it again.
```
##########
File path: apisix/plugins/openid-connect.lua
##########
@@ -29,16 +29,43 @@ local schema = {
client_id = {type = "string"},
client_secret = {type = "string"},
discovery = {type = "string"},
- scope = {type = "string"},
- ssl_verify = {type = "boolean"}, -- default is false
- timeout = {type = "integer", minimum = 1}, --default is 3 seconds
- introspection_endpoint = {type = "string"}, --default is nil
- --default is client_secret_basic
- introspection_endpoint_auth_method = {type = "string"},
- bearer_only = {type = "boolean"}, -- default is false
- realm = {type = "string"}, -- default is apisix
- logout_path = {type = "string"}, -- default is /logout
- redirect_uri = {type = "string"}, -- default is ngx.var.request_uri
+ scope = {
+ type = "string",
+ default = "openid",
+ },
+ ssl_verify = {
+ type = "boolean",
+ default = false,
+ },
+ timeout = {
+ type = "integer",
+ minimum = 1,
+ default = 3,
+ description = "timeout in second",
Review comment:
```suggestion
description = "timeout in seconds",
```
##########
File path: doc/plugins/openid-connect.md
##########
@@ -41,7 +41,7 @@ The OAuth 2 / Open ID Connect(OIDC) plugin provides
authentication and introspec
| bearer_only | boolean | optional | false
| | Setting this `true` will check for the authorization header
in the request with a bearer token |
| logout_path | string | optional | "/logout"
| |
|
| redirect_uri | string | optional |
"ngx.var.request_uri" | |
|
-| timeout | integer | optional | 3
| [1,...] |
|
+| timeout | integer | optional | 3
| [1,...] | Timeout in second
|
Review comment:
```suggestion
| timeout | integer | optional | 3
| [1,...] | Timeout in seconds
|
```
##########
File path: apisix/plugins/openid-connect.lua
##########
@@ -148,6 +150,13 @@ end
function _M.rewrite(plugin_conf, ctx)
local conf = core.table.clone(plugin_conf)
+
+ -- Previously, we multiple conf.timeout before storing it in etcd.
Review comment:
```suggestion
-- Previously, we multiply conf.timeout before storing it in etcd.
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]