Skip to content

Commit

Permalink
test: add proxy_opts attribute for openid-connect.md (#9922)
Browse files Browse the repository at this point in the history
  • Loading branch information
fengbr1 committed Aug 2, 2023
1 parent 9021bc8 commit 1a43a97
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions t/plugin/openid-connect.t
Original file line number Diff line number Diff line change
Expand Up @@ -1303,3 +1303,44 @@ passed
}
--- response_body_like
x-userinfo: ey.*
=== TEST 34: Set up new route access the auth server via http proxy
--- ONLY
--- config
location /t {
content_by_lua_block {
local t = require("lib.test_admin").test
local code, body = t('/apisix/admin/routes/1',
ngx.HTTP_PUT,
[[{
"plugins": {
"openid-connect": {
"client_id": "kbyuFDidLLm280LIwVFiazOqjO3ty8KH",
"client_secret": "60Op4HFM0I8ajz0WdiStAbziZ-VFQttXuxixHHs2R7r7-CW8GR79l-mmLqMhc-Sa",
"discovery": "http://127.0.0.1:1980/.well-known/openid-configuration",
"redirect_uri": "https://iresty.com",
"ssl_verify": false,
"timeout": 10,
"scope": "apisix",
"proxy_opts": "http://username:password@127.0.0.1:8080",
"use_pkce": false
}
},
"upstream": {
"nodes": {
"127.0.0.1:1980": 1
},
"type": "roundrobin"
},
"uri": "/hello"
}]]
)
if code >= 300 then
ngx.status = code
end
ngx.say(body)
}
}
--- response_body
passed

0 comments on commit 1a43a97

Please sign in to comment.