1 write to Context
Microsoft.AspNetCore.Authentication (1)
147 references to Context
Aspire.Dashboard (6)
Microsoft.AspNetCore.Authentication (19)
RemoteAuthenticationHandler.cs (8)
116var errorContext = new RemoteFailureContext(Context, Scheme, Options, exception)
146var ticketContext = new TicketReceivedContext(Context, Scheme, Options, ticket)
172await Context.SignInAsync(SignInScheme, ticketContext.Principal!, ticketContext.Properties);
194var result = await Context.AuthenticateAsync(SignInScheme);
220=> Context.ForbidAsync(SignInScheme);
234var cookieOptions = Options.CorrelationCookie.Build(Context, TimeProvider.GetUtcNow());
269var cookieOptions = Options.CorrelationCookie.Build(Context, TimeProvider.GetUtcNow());
290var context = new AccessDeniedContext(Context, Scheme, Options)
Microsoft.AspNetCore.Authentication.BearerToken (3)
Microsoft.AspNetCore.Authentication.Certificate (8)
CertificateAuthenticationHandler.cs (8)
44_cache = Context.RequestServices.GetService<ICertificateValidationCache>();
51if (!Context.Request.IsHttps)
59var clientCertificate = await Context.Connection.GetClientCertificateAsync();
70var cacheHit = _cache.Get(Context, clientCertificate);
89_cache?.Put(Context, clientCertificate, result);
106var authenticationFailedContext = new CertificateAuthenticationFailedContext(Context, Scheme, Options)
155var certificateValidatedContext = new CertificateValidatedContext(Context, Scheme, Options)
174var authenticationChallengedContext = new CertificateChallengeContext(Context, Scheme, Options, properties);
Microsoft.AspNetCore.Authentication.Cookies (27)
CookieAuthenticationHandler.cs (27)
72Context.Response.OnStarting(FinishResponseAsync);
103var eventContext = new CookieSlidingExpirationContext(Context, Scheme, Options, ticket, timeElapsed, timeRemaining)
152var cookie = Options.CookieManager.GetRequestCookie(Context, Options.Cookie.Name!);
172ticket = await Options.SessionStore.RetrieveAsync(claim.Value, Context, Context.RequestAborted);
187await Options.SessionStore.RemoveAsync(_sessionKey!, Context, Context.RequestAborted);
213var context = new CookieValidatePrincipalContext(Context, Scheme, Options, result.Ticket);
231var cookieOptions = Options.Cookie.Build(Context);
264await Options.SessionStore.RenewAsync(_sessionKey, ticket, Context, Context.RequestAborted);
281Context,
304Context,
342await Options.SessionStore.RenewAsync(_sessionKey, ticket, Context, Context.RequestAborted);
346_sessionKey = await Options.SessionStore.StoreAsync(ticket, Context, Context.RequestAborted);
359Context,
365Context,
392await Options.SessionStore.RemoveAsync(_sessionKey, Context, Context.RequestAborted);
396Context,
405Context,
443new RedirectContext<CookieAuthenticationOptions>(Context, Scheme, Options, properties, redirectUri));
470var redirectContext = new RedirectContext<CookieAuthenticationOptions>(Context, Scheme, Options, properties, BuildRedirectUri(accessDeniedUri));
484var redirectContext = new RedirectContext<CookieAuthenticationOptions>(Context, Scheme, Options, properties, BuildRedirectUri(loginUri));
490var binding = Context.Features.Get<ITlsTokenBindingFeature>()?.GetProvidedTokenBindingId();
Microsoft.AspNetCore.Authentication.Facebook (3)
Microsoft.AspNetCore.Authentication.Google (3)
Microsoft.AspNetCore.Authentication.JwtBearer (7)
JwtBearerHandler.cs (7)
62var messageReceivedContext = new MessageReceivedContext(Context, Scheme, Options);
153var tokenValidatedContext = new TokenValidatedContext(Context, Scheme, Options)
182var authenticationFailedContext = new AuthenticationFailedContext(Context, Scheme, Options)
207var authenticationFailedContext = new AuthenticationFailedContext(Context, Scheme, Options)
253var configuration = await Options.ConfigurationManager.GetConfigurationAsync(Context.RequestAborted);
278var eventContext = new JwtBearerChallengeContext(Context, Scheme, Options, properties)
351var forbiddenContext = new ForbiddenContext(Context, Scheme, Options);
Microsoft.AspNetCore.Authentication.MicrosoftAccount (3)
Microsoft.AspNetCore.Authentication.Negotiate (8)
NegotiateHandler.cs (8)
164Context.Response.StatusCode = StatusCodes.Status400BadRequest;
266var errorContext = new AuthenticationFailedContext(Context, Scheme, Options) { Exception = ex };
337var ldapContext = new LdapContext(Context, Scheme, Options, Options.LdapSettings)
351authenticatedContext = new AuthenticatedContext(Context, Scheme, Options)
358authenticatedContext = new AuthenticatedContext(Context, Scheme, Options)
384var eventContext = new ChallengeContext(Context, Scheme, Options, properties);
407return Context.Features.Get<IConnectionItemsFeature>()?.Items
413var connectionCompleteFeature = Context.Features.Get<IConnectionCompleteFeature>()
Microsoft.AspNetCore.Authentication.OAuth (6)
OAuthHandler.cs (6)
222var response = await Backchannel.SendAsync(requestMessage, Context.RequestAborted);
223var body = await response.Content.ReadAsStringAsync(Context.RequestAborted);
256var context = new OAuthCreatingTicketContext(new ClaimsPrincipal(identity), properties, Context, Scheme, Options, Backchannel, tokens, user.RootElement);
275Context, Scheme, Options,
279var location = Context.Response.Headers.Location;
285var cookie = Context.Response.Headers.SetCookie;
Microsoft.AspNetCore.Authentication.OpenIdConnect (30)
OpenIdConnectHandler.cs (30)
123var form = await Request.ReadFormAsync(Context.RequestAborted);
131var remoteSignOutContext = new RemoteSignOutContext(Context, Scheme, Options, message);
161var principal = (await Context.AuthenticateAsync(Options.SignOutScheme))?.Principal;
200await Context.SignOutAsync(Options.SignOutScheme);
213await Context.SignOutAsync(target, properties);
223_configuration = await Options.ConfigurationManager.GetConfigurationAsync(Context.RequestAborted);
247message.IdTokenHint = await Context.GetTokenAsync(Options.SignOutScheme, OpenIdConnectParameterNames.IdToken);
249var redirectContext = new RedirectContext(Context, Scheme, Options, properties)
325var signOut = new RemoteSignOutContext(Context, Scheme, Options, message)
365var location = Context.Response.Headers.Location;
371var cookie = Context.Response.Headers.SetCookie;
395_configuration = await Options.ConfigurationManager.GetConfigurationAsync(Context.RequestAborted);
458var redirectContext = new RedirectContext(Context, Scheme, Options, properties)
558var context = new PushedAuthorizationContext(Context, Scheme, Options, parRequest, properties);
595var parResponseMessage = await Backchannel.SendAsync(requestMessage, Context.RequestAborted);
614var parResponseString = await parResponseMessage.Content.ReadAsStringAsync(Context.RequestAborted);
662var form = await Request.ReadFormAsync(Context.RequestAborted);
751_configuration = await Options.ConfigurationManager.GetConfigurationAsync(Context.RequestAborted);
990var responseMessage = await Backchannel.SendAsync(requestMessage, Context.RequestAborted);
1012var responseContent = await responseMessage.Content.ReadAsStringAsync(Context.RequestAborted);
1056var responseMessage = await Backchannel.SendAsync(requestMessage, Context.RequestAborted);
1058var userInfoResponse = await responseMessage.Content.ReadAsStringAsync(Context.RequestAborted);
1158var cookieOptions = Options.NonceCookie.Build(Context, TimeProvider.GetUtcNow());
1189var cookieOptions = Options.NonceCookie.Build(Context, TimeProvider.GetUtcNow());
1207var context = new MessageReceivedContext(Context, Scheme, Options, properties)
1230var context = new TokenValidatedContext(Context, Scheme, Options, user, properties)
1275var context = new AuthorizationCodeReceivedContext(Context, Scheme, Options, properties)
1307var context = new TokenResponseReceivedContext(Context, Scheme, Options, user, properties)
1333var context = new UserInformationReceivedContext(Context, Scheme, Options, principal, properties)
1357var context = new AuthenticationFailedContext(Context, Scheme, Options)
Microsoft.AspNetCore.Authentication.Twitter (9)
Microsoft.AspNetCore.Authentication.WsFederation (13)
WsFederationHandler.cs (13)
89_configuration = await Options.ConfigurationManager.GetConfigurationAsync(Context.RequestAborted);
116var redirectContext = new RedirectContext(Context, Scheme, Options, properties)
160var form = await Request.ReadFormAsync(Context.RequestAborted);
201var messageReceivedContext = new MessageReceivedContext(Context, Scheme, Options, properties)
233var securityTokenReceivedContext = new SecurityTokenReceivedContext(Context, Scheme, Options, properties)
333var securityTokenValidatedContext = new SecurityTokenValidatedContext(Context, Scheme, Options, principal, properties)
356var authenticationFailedContext = new AuthenticationFailedContext(Context, Scheme, Options)
386_configuration = await Options.ConfigurationManager.GetConfigurationAsync(Context.RequestAborted);
416await Context.SignOutAsync(target, properties);
422_configuration = await Options.ConfigurationManager.GetConfigurationAsync(Context.RequestAborted);
449var redirectContext = new RedirectContext(Context, Scheme, Options, properties)
477var remoteSignOutContext = new RemoteSignOutContext(Context, Scheme, Options, message);
496await Context.SignOutAsync(Options.SignOutScheme);
Microsoft.AspNetCore.Identity (2)