Пример #1
0
        protected virtual async Task <AuthenticationTicket> CreateTicketAsync(
            ClaimsIdentity identity, AuthenticationProperties properties, AccessToken token, JsonElement user)
        {
            foreach (var action in Options.ClaimActions)
            {
                action.Run(user, identity, ClaimsIssuer);
            }

            var context = new TumblrCreatingTicketContext(Context, Scheme, Options, new ClaimsPrincipal(identity), properties, token.Token, token.TokenSecret, user);
            await Events.CreatingTicket(context);

            return(new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name));
        }
Пример #2
0
 /// <summary>
 /// Invoked whenever Tumblr successfully 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 CreatingTicket(TumblrCreatingTicketContext context) => OnCreatingTicket(context);