[英]How to fix “None of the audience values matched the tokenEndpoint Alias https://172.28.1.101:9444/oauth2/token”?
I am setting up WSO2 API Manager and secure API with self contained access token (JWT). 我正在使用自包含的访问令牌(JWT)设置WSO2 API管理器和安全API。 Here's a link i followed to protect your APIs with self contained access token (JWT) using WSO2 API Manager and WSO2 Identity Server.
这是我使用WSO2 API Manager和WSO2 Identity Server通过自包含的访问令牌(JWT)保护您的API 的链接 。
I am getting JWT token from the WSO2 identity server. 我正在从WSO2身份服务器获取JWT令牌。 But when I tried to get access token using the JWT token from WSO2IS, I am getting following error
但是,当我尝试使用WSO2IS的JWT令牌获取访问令牌时,出现以下错误
HTTP/1.1 400 Bad Request HTTP / 1.1 400错误请求
X-Frame-Options: DENY X-Frame-Options:DENY
X-Content-Type-Options: nosniff X-Content-Type-Options:nosniff
X-XSS-Protection: 1; X-XSS-Protection:1; mode=block
模式=块
Date: Thu, 29 Aug 2019 11:53:42 GMT 日期:2019年8月29日星期四11:53:42 GMT
Content-Type: application/json 内容类型:application / json
Content-Length: 146 内容长度:146
Connection: close 连接方式:关闭
Server: WSO2 Carbon Server 服务器:WSO2 Carbon服务器
{"error_description":"None of the audience values matched the tokenEndpoint Alias https://172.28.1.101:9444/oauth2/token ","error":"invalid_grant"} {“ error_description”:“没有任何受众群体值与令牌端点别名匹配https://172.28.1.101:9444/oauth2/token “,” error“:” invalid_grant“}
I assume that you are using Oauth 2 Authorization code grant type. 我假设您使用的是Oauth 2授权代码授予类型。 You have taken a JWT and then using that you are trying to get the access token.
您已经使用了JWT,然后使用它尝试获取访问令牌。 In your service provider configuration under Inbound Authentication Configuration under OAuth/OpenID Connect Configuration if you click edit there is a checkbox field named Enable Audience Restriction.
如果单击“编辑”,则在OAuth / OpenID Connect配置下的“入站身份验证配置”下的服务提供商配置中,有一个复选框字段名为“启用受众限制”。 Add the https://172.28.1.101:9444/oauth2/token as an audience.
将https://172.28.1.101:9444/oauth2/token添加为受众群体。 Then try the flow.
然后尝试该流程。 For more information refer
有关更多信息,请参阅
https://docs.wso2.com/display/IS570/Configuring+Inbound+Authentication+for+a+Service+Provider https://docs.wso2.com/display/IS570/Configuring+Inbound+Authentication+for+a+Service+Provider
OAuth/OpenID Connect Configuration OAuth / OpenID Connect配置
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.