public override async Task <AuthenticationTicket> ExecuteAsync() { // Validate passed state var stateData = Global.StateCache.ReturnState(AuthResponse.State); if (stateData == null) { throw new BadRequestException("Invalid state: Please reattempt the request"); } // Generate claims and create user information & authentication ticket var kcIdentity = new KeycloakIdentity(await ExecuteHttpRequestAsync()); var properties = stateData[Constants.CacheTypes.AuthenticationProperties] as AuthenticationProperties ?? new AuthenticationProperties(); return(new AuthenticationTicket(await kcIdentity.ValidateIdentity(Options), properties)); }
public override async Task <ClaimsIdentity> ExecuteAsync() { var newKcIdentity = new KeycloakIdentity(await ExecuteHttpRequestAsync(RefreshToken)); return(await newKcIdentity.ValidateIdentity(Options)); }