public override Task Authenticated(VkAuthenticatedContext context)
        {
            context.Identity.AddClaim(new Claim(ClaimTypes.GivenName, context.Name));
            context.Identity.AddClaim(new Claim(ClaimTypes.Surname, context.LastName));
            context.Identity.AddClaim(new Claim(ClaimTypes.Sid, context.Id));
            context.Identity.AddClaim(new Claim(OAuthClaimsParser.ClaimTypeAvatarUrl, context.Link));
            //context.Identity.AddClaim(new Claim(ClaimTypes.Email,context.Email));

            return base.Authenticated(context);
        }
 /// <summary>
 /// Invoked whenever succesfully authenticates a user
 /// </summary>
 /// <param name="context">Contains information about the login session as well as the user <see cref="System.Security.Claims.ClaimsIdentity"/>.</param>
 /// <returns>A <see cref="Task"/> representing the completed operation.</returns>
 public virtual Task Authenticated(VkAuthenticatedContext context)
 {
     return OnAuthenticated(context);
 }
Esempio n. 3
0
 /// <summary>
 /// Invoked whenever succesfully authenticates a user
 /// </summary>
 /// <param name="context">Contains information about the login session as well as the user <see cref="System.Security.Claims.ClaimsIdentity"/>.</param>
 /// <returns>A <see cref="Task"/> representing the completed operation.</returns>
 public virtual Task Authenticated(VkAuthenticatedContext context)
 {
     return(OnAuthenticated(context));
 }