提交 a2ac5b68 编写于 作者: Jave_NewBie's avatar Jave_NewBie 提交者: Gitee

fix:授权范围 email phone address 判断与预期逻辑相反

上级 8074abd3
......@@ -79,7 +79,7 @@ public class UserInfoEndpoint extends AbstractEndpoint {
}
}
// This scope value requests access to the email and email_verified Claims.
if (scopes.contains("email")) {
if (!scopes.contains("email")) {
ScopeClaimsMapping scopeClaimsMapping = ScopeClaimsMapping.email;
List<String> claims = scopeClaimsMapping.getClaims();
for (String claim : claims) {
......@@ -87,7 +87,7 @@ public class UserInfoEndpoint extends AbstractEndpoint {
}
}
// This scope value requests access to the phone_number and phone_number_verified Claims.
if (scopes.contains("phone")) {
if (!scopes.contains("phone")) {
ScopeClaimsMapping scopeClaimsMapping = ScopeClaimsMapping.phone;
List<String> claims = scopeClaimsMapping.getClaims();
for (String claim : claims) {
......@@ -95,7 +95,7 @@ public class UserInfoEndpoint extends AbstractEndpoint {
}
}
// This scope value requests access to the address Claim.
if (scopes.contains("address")) {
if (!scopes.contains("address")) {
ScopeClaimsMapping scopeClaimsMapping = ScopeClaimsMapping.address;
List<String> claims = scopeClaimsMapping.getClaims();
for (String claim : claims) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册