WSO2身份服务器OAuth2访问令牌请求重定向到登录页面

WSO2身份服务器OAuth2访问令牌请求重定向到登录页面,wso2,wso2is,Wso2,Wso2is,我正在尝试向https://{identity server}:9443/oauth2/token发送请求。请求被重定向到以下位置:https://{identity server}:9443/carbon/admin/login.jsp。我使用的版本是5.7.0,作为集群设置部署在Kubernetes上 请求中缺少授权标头。这就是您被重定向到登录页面的原因 尝试像这样提供授权标头 Authorization: Basic [Base64encode(Client-ID>:<Clie

我正在尝试向https://{identity server}:9443/oauth2/token发送请求。请求被重定向到以下位置:
https://{identity server}:9443/carbon/admin/login.jsp
。我使用的版本是5.7.0,作为集群设置部署在Kubernetes上

请求中缺少授权标头。这就是您被重定向到登录页面的原因

尝试像这样提供授权标头

Authorization: Basic [Base64encode(Client-ID>:<ClientSecret>)]

你能展示你的curl请求和响应吗?curl请求:
curl-xposthttps://localhost:9443/oauth2/token -H'缓存控制:无缓存'-H'内容类型:application/x-www-form-urlencoded'-I'grant_type=password&username=***&password=***&client_id=*********&client_secret=******&scope=bearer'-k
响应:
HTTP/1.1 302X-Content-Type-Options:nosniff X-XSS-Protection:1;模式=块集Cookie:JSESSIONID=55AB7963F5AAD09AE730890045E7CC2D;路径=/;保护HttpOnly设置Cookie:requestedURI=../../oauth2/token;路径=/;保护HttpOnly位置:https://localhost:9443/carbon/admin/login.jsp 内容类型:text/html;charset=UTF-8内容长度:0日期:2020年2月24日星期一07:27:00 GMT服务器:WSO2碳服务器
如果您正确传递授权标头,则上述请求应有效。请您将服务提供商的截图与新的curl请求和响应一起分享。请求:
curl-X POSThttps://localhost:9443/oauth2/token -H'授权:基本******'-H'缓存控制:无缓存'-H'内容类型:应用程序/x-www-form-urlencoded'\-H'邮递员令牌:***'\-d“grant_type=password&username=***&password=***&client_id=***&client_secret=****”
服务提供商:oauth2配置:您能从正文中删除client_id和client_secret并重试吗?
curl -X POST \
  https://localhost:9443/oauth2/token \
  -H 'Authorization: Basic Zkd2ZlhiQ05VeUFmd2ltQW9HSWYycXZDakdFYTpFb1NOWDdHNFQ2NGZjcVFyZTVIX2NPR01CS2Nh' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'username=admin&password=admin&grant_type=password&scope=bearer'