Skip to content
This repository has been archived by the owner on Jan 17, 2024. It is now read-only.

Commit

Permalink
rename userName to email in Token endpoint for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle Linden committed Oct 3, 2016
1 parent c213ae2 commit 8785d93
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions DOL.WHD.Section14c.Api/Providers/ApplicationOAuthProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public override async Task GrantResourceOwnerCredentials(OAuthGrantResourceOwner
ClaimsIdentity cookiesIdentity = await user.GenerateUserIdentityAsync(userManager,
CookieAuthenticationDefaults.AuthenticationType);

AuthenticationProperties properties = CreateProperties(user.UserName);
AuthenticationProperties properties = CreateProperties(user.Email);
AuthenticationTicket ticket = new AuthenticationTicket(oAuthIdentity, properties);
context.Validated(ticket);
context.Request.Context.Authentication.SignIn(cookiesIdentity);
Expand Down Expand Up @@ -121,11 +121,11 @@ public override Task ValidateClientRedirectUri(OAuthValidateClientRedirectUriCon
return Task.FromResult<object>(null);
}

public static AuthenticationProperties CreateProperties(string userName)
public static AuthenticationProperties CreateProperties(string email)
{
IDictionary<string, string> data = new Dictionary<string, string>
{
{ "userName", userName }
{ "email", email }
};
return new AuthenticationProperties(data);
}
Expand Down

0 comments on commit 8785d93

Please sign in to comment.