public Task <ClaimsPrincipal> TransformAsync(ClaimsPrincipal principal) { ClaimsPrincipal newPrincipal = new ComBoostPrincipal(SecurityProvider); newPrincipal.AddIdentities(principal.Identities); return(Task.FromResult(newPrincipal)); }
public Task <ClaimsPrincipal> TransformAsync(ClaimsTransformationContext context) { var securityProvider = context.Context.RequestServices.GetRequiredService <ISecurityProvider>(); ClaimsPrincipal principal = new ComBoostPrincipal(securityProvider); principal.AddIdentities(context.Principal.Identities); return(Task.FromResult(principal)); }