|
|
@@ -26,22 +26,11 @@ namespace Microsoft.AspNetCore.Authentication.Google
|
|
|
Scope.Add("email");
|
|
|
|
|
|
ClaimActions.MapJsonKey(ClaimTypes.NameIdentifier, "id");
|
|
|
- if (GoogleDefaults.UseGooglePlus)
|
|
|
- {
|
|
|
- ClaimActions.MapJsonKey(ClaimTypes.Name, "displayName");
|
|
|
- ClaimActions.MapJsonSubKey(ClaimTypes.GivenName, "name", "givenName");
|
|
|
- ClaimActions.MapJsonSubKey(ClaimTypes.Surname, "name", "familyName");
|
|
|
- ClaimActions.MapJsonKey("urn:google:profile", "url");
|
|
|
- ClaimActions.MapCustomJson(ClaimTypes.Email, GoogleHelper.GetEmail);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- ClaimActions.MapJsonKey(ClaimTypes.Name, "name");
|
|
|
- ClaimActions.MapJsonKey(ClaimTypes.GivenName, "given_name");
|
|
|
- ClaimActions.MapJsonKey(ClaimTypes.Surname, "family_name");
|
|
|
- ClaimActions.MapJsonKey("urn:google:profile", "link");
|
|
|
- ClaimActions.MapJsonKey(ClaimTypes.Email, "email");
|
|
|
- }
|
|
|
+ ClaimActions.MapJsonKey(ClaimTypes.Name, "name");
|
|
|
+ ClaimActions.MapJsonKey(ClaimTypes.GivenName, "given_name");
|
|
|
+ ClaimActions.MapJsonKey(ClaimTypes.Surname, "family_name");
|
|
|
+ ClaimActions.MapJsonKey("urn:google:profile", "link");
|
|
|
+ ClaimActions.MapJsonKey(ClaimTypes.Email, "email");
|
|
|
}
|
|
|
|
|
|
/// <summary>
|