File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
main/java/org/springframework/security/config/oauth2/client
test/java/org/springframework/security/config/oauth2/client Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ public Builder getBuilder(String registrationId) {
58
58
builder .authorizationUri ("https://github.com/login/oauth/authorize" );
59
59
builder .tokenUri ("https://github.com/login/oauth/access_token" );
60
60
builder .userInfoUri ("https://api.github.com/user" );
61
- builder .userNameAttributeName ("name " );
61
+ builder .userNameAttributeName ("id " );
62
62
builder .clientName ("GitHub" );
63
63
return builder ;
64
64
}
@@ -74,7 +74,7 @@ public Builder getBuilder(String registrationId) {
74
74
builder .authorizationUri ("https://www.facebook.com/v2.8/dialog/oauth" );
75
75
builder .tokenUri ("https://graph.facebook.com/v2.8/oauth/access_token" );
76
76
builder .userInfoUri ("https://graph.facebook.com/me" );
77
- builder .userNameAttributeName ("name " );
77
+ builder .userNameAttributeName ("id " );
78
78
builder .clientName ("Facebook" );
79
79
return builder ;
80
80
}
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ public void getBuilderWhenGitHubShouldHaveGitHubSettings() throws Exception {
69
69
assertThat (providerDetails .getUserInfoEndpoint ().getUri ())
70
70
.isEqualTo ("https://api.github.com/user" );
71
71
assertThat (providerDetails .getUserInfoEndpoint ().getUserNameAttributeName ())
72
- .isEqualTo ("name " );
72
+ .isEqualTo ("id " );
73
73
assertThat (providerDetails .getJwkSetUri ()).isNull ();
74
74
assertThat (registration .getClientAuthenticationMethod ())
75
75
.isEqualTo (ClientAuthenticationMethod .BASIC );
@@ -92,7 +92,7 @@ public void getBuilderWhenFacebookShouldHaveFacebookSettings() throws Exception
92
92
assertThat (providerDetails .getUserInfoEndpoint ().getUri ())
93
93
.isEqualTo ("https://graph.facebook.com/me" );
94
94
assertThat (providerDetails .getUserInfoEndpoint ().getUserNameAttributeName ())
95
- .isEqualTo ("name " );
95
+ .isEqualTo ("id " );
96
96
assertThat (providerDetails .getJwkSetUri ()).isNull ();
97
97
assertThat (registration .getClientAuthenticationMethod ())
98
98
.isEqualTo (ClientAuthenticationMethod .POST );
You can’t perform that action at this time.
0 commit comments