提交 5e668909 编写于 作者: 智布道's avatar 智布道 👁 提交者: Gitee

!16 fix: the bug of userinfo endpoint

Merge pull request !16 from Lowis/dev
......@@ -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.
先完成此消息的编辑!
想要评论请 注册