@@ -1384,9 +1384,10 @@ x-userinfo: ey.*
13841384 "openid-connect": {
13851385 "client_id": "kbyuFDidLLm280LIwVFiazOqjO3ty8KH",
13861386 "client_secret": "60Op4HFM0I8ajz0WdiStAbziZ-VFQttXuxixHHs2R7r7-CW8GR79l-mmLqMhc-Sa",
1387- "discovery": "https ://samples.auth0.com /.well-known/openid-configuration",
1387+ "discovery": "http ://127.0.0.1:1980 /.well-known/openid-configuration",
13881388 "redirect_uri": "https://iresty.com",
13891389 "post_logout_redirect_uri": "https://iresty.com",
1390+ "ssl_verify": false,
13901391 "scope": "openid profile",
13911392 "session": {
13921393 "secret": "jwcE5v3pM9VhqLxmxFOH9uZaLo8u7KQK"
@@ -1414,8 +1415,7 @@ passed
14141415
14151416
14161417
1417- === TEST 36: Check whether auth0 can redirect normally using post_logout_redirect_uri configuration
1418- --- custom_trusted_cert: /etc/ssl/certs/ca-certificates.crt
1418+ === TEST 36: Redirect to post_logout_redirect_uri when provider has no end_session_endpoint
14191419--- config
14201420 location /t {
14211421 content_by_lua_block {
@@ -1424,9 +1424,9 @@ passed
14241424 local uri = "http://127.0.0.1:" .. ngx.var.server_port .. "/logout"
14251425 local res, err = httpc:request_uri(uri, {method = "GET"})
14261426 ngx.status = res.status
1427- local location = res.headers['Location']
1428- if location and string. find(location, 'https://iresty.com') ~= -1 and
1429- string. find(location, 'post_logout_redirect_uri=https://iresty.com') ~= -1 then
1427+ local location = ngx.unescape_uri( res.headers['Location'] or "")
1428+ if location: find('https://iresty.com', 1, true) and
1429+ location: find('post_logout_redirect_uri=https://iresty.com', 1, true) then
14301430 ngx.say(true)
14311431 end
14321432 }
@@ -1447,11 +1447,12 @@ true
14471447 ngx.HTTP_PUT,
14481448 [[{ "plugins": {
14491449 "openid-connect": {
1450- "client_id": "942299072001-vhduu1uljmdhhbbp7g22m3qsmo246a75.apps.googleusercontent.com ",
1451- "client_secret": "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 ",
1452- "discovery": "https ://accounts.google.com /.well-known/openid-configuration",
1450+ "client_id": "kbyuFDidLLm280LIwVFiazOqjO3ty8KH ",
1451+ "client_secret": "60Op4HFM0I8ajz0WdiStAbziZ-VFQttXuxixHHs2R7r7-CW8GR79l-mmLqMhc-Sa ",
1452+ "discovery": "http ://127.0.0.1:1980 /.well-known/openid-configuration-with-end-session ",
14531453 "redirect_uri": "https://iresty.com",
14541454 "post_logout_redirect_uri": "https://iresty.com",
1455+ "ssl_verify": false,
14551456 "scope": "openid profile",
14561457 "session": {
14571458 "secret": "jwcE5v3pM9VhqLxmxFOH9uZaLo8u7KQK"
@@ -1479,8 +1480,7 @@ passed
14791480
14801481
14811482
1482- === TEST 38: Check whether google can redirect normally using post_logout_redirect_uri configuration
1483- --- custom_trusted_cert: /etc/ssl/certs/ca-certificates.crt
1483+ === TEST 38: Redirect to end_session_endpoint with post_logout_redirect_uri when provider exposes it
14841484--- config
14851485 location /t {
14861486 content_by_lua_block {
@@ -1489,9 +1489,9 @@ passed
14891489 local uri = "http://127.0.0.1:" .. ngx.var.server_port .. "/logout"
14901490 local res, err = httpc:request_uri(uri, {method = "GET"})
14911491 ngx.status = res.status
1492- local location = res.headers['Location']
1493- if location and string. find(location, 'https://iresty. com') ~= -1 and
1494- string. find(location, 'post_logout_redirect_uri=https://iresty.com') ~= -1 then
1492+ local location = ngx.unescape_uri( res.headers['Location'] or "")
1493+ if location: find('https://samples.auth0. com/v2/logout', 1, true) and
1494+ location: find('post_logout_redirect_uri=https://iresty.com', 1, true) then
14951495 ngx.say(true)
14961496 end
14971497 }
0 commit comments