lakewatcher opened a new issue, #10986:
URL: https://github.com/apache/apisix/issues/10986

   ### Description
   
   看了很多的文档,依然无法跳转回来。所以冒昧的请教一下:使用keycloack 如何配置跳转?
   
   假设拦截的API如下:
   {
     "uri": "/demo/test/userInfo10",
     "name": "test003",
     "methods": [    "GET"  ],
     "plugins": {
       "openid-connect": {
         "access_token_in_authorization_header": true,
         "bearer_only": false,
         "client_id": "course_management",
         "client_secret": "d1ec69e9-55d2-4109-a3ea-befa071579d5",
         "disable": false,
         "discovery": 
"http://10.202.12.85:8090/auth/realms/University/.well-known/openid-configuration";,
         "introspection_endpoint_auth_method": "client_secret_post",
         "realm": "University",
         "redirect_uri": "https://gateway-dev.xxx/demo/authorize/call";,
         "set_access_token_header": true,
         "set_userinfo_header": true
       },
       "proxy-rewrite": {
         "uri": "/test/userInfo"
       }
     },
     "service_id": "demo",
     "upstream_id": "demo",
     "status": 1
   }
   
   上面的配置,可以跳转到 keycloack的登录页面,登录后,跳转 redirect_uri,但是 redirect_uri 
如何配置,才能完成获取token,跳转回指定首页 或 最开始访问的页面
   
   我使用如下配置,但是不能到达指定接口
   {
     "uri": "/demo/authorize/*",
     "name": "authorize",
     "plugins": {
       "proxy-rewrite": {
         "scheme": "http",
         "uri": "/test/userInfo"
       }
     },
     "service_id": "demo",
     "upstream_id": "demo",
     "status": 1
   }
   
   
https://gateway-dev.xxx/demo/authorize/call?state=b1548f7095e709ee9fc1a8c378366c52&session_state=6175733e-be74-4831-a7b3-abb61e19dca6&code=fd0209ec-fd80-44b4-a1e9-92b535f0b5d5.6175733e-be74-4831-a7b3-abb61e19dca6.e6e632a5-5189-4b21-b88b-1ea102922ff1
   
   /demo/authorize/* 加了 "openid-connect": {
         "access_token_in_authorization_header": true,
         "bearer_only": false,
         "client_id": "course_management",
         "client_secret": "d1ec69e9-55d2-4109-a3ea-befa071579d5",
         "disable": false,
         "discovery": 
"http://10.202.12.85:8090/auth/realms/University/.well-known/openid-configuration";,
         "introspection_endpoint_auth_method": "client_secret_post",
         "realm": "University",
         "redirect_uri": "https://gateway-dev.xxx/demo/authorize/call";,
         "set_access_token_header": true,
         "set_userinfo_header": true
       }, 
       会出现以下错误:
   An error occurred.
   You can report issue to [APISIX](https://github.com/apache/apisix/issues)
   Faithfully yours, [APISIX](https://apisix.apache.org/).
   
   不加会出现:
   
   
![image](https://github.com/apache/apisix/assets/27823963/7fcf4191-ff83-4021-8d3c-2c885d2159b5)
   
   
   ### Environment
   
   
   
   
   
   
   
   - APISIX version (run `apisix version`):2.15.3
   - Operating system (run `uname -a`):Linux TLVM202017071 
3.10.0-1160.80.1.el7.x86_64 https://github.com/apache/apisix/pull/1 SMP Tue Nov 
8 15:48:59 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`):nginx 
version: openresty/1.21.4.1
   - etcd version, if relevant (run `curl 
http://127.0.0.1:9090/v1/server_info`):{"boot_time":1704193495,"etcd_version":"3.5.0","id":"0880b644-4f19-49e1-af77-1be7d3d7e196","version":"2.15.3","hostname":"TLVM202017071"}
   - APISIX Dashboard version, if relevant:
   - Plugin runner version, for issues related to plugin runners:OIDC
   - LuaRocks version, for installation issues (run `luarocks --version`):
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to