1 write to Context
Microsoft.AspNetCore.Authentication (1)
157 references to Context
Aspire.Dashboard (15)
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());
270var cookieOptions = Options.CorrelationCookie.Build(Context, TimeProvider.GetUtcNow());
291var context = new AccessDeniedContext(Context, Scheme, Options)
Microsoft.AspNetCore.Authentication.BearerToken (3)
Microsoft.AspNetCore.Authentication.Certificate (9)
CertificateAuthenticationHandler.cs (9)
46_cache = Context.RequestServices.GetService<ICertificateValidationCache>();
53if (!Context.Request.IsHttps)
61var clientCertificate = await Context.Connection.GetClientCertificateAsync();
72Context.Items[CertificateSchemeCacheKeyItem] = Scheme.Name;
73var cacheHit = _cache.Get(Context, clientCertificate);
92_cache?.Put(Context, clientCertificate, result);
109var authenticationFailedContext = new CertificateAuthenticationFailedContext(Context, Scheme, Options)
172var certificateValidatedContext = new CertificateValidatedContext(Context, Scheme, Options)
191var authenticationChallengedContext = new CertificateChallengeContext(Context, Scheme, Options, properties);
Microsoft.AspNetCore.Authentication.Cookies (27)
CookieAuthenticationHandler.cs (27)
73Context.Response.OnStarting(FinishResponseAsync);
104var eventContext = new CookieSlidingExpirationContext(Context, Scheme, Options, ticket, timeElapsed, timeRemaining)
153var cookie = Options.CookieManager.GetRequestCookie(Context, Options.Cookie.Name!);
173ticket = await Options.SessionStore.RetrieveAsync(claim.Value, Context, Context.RequestAborted);
188await Options.SessionStore.RemoveAsync(_sessionKey!, Context, Context.RequestAborted);
214var context = new CookieValidatePrincipalContext(Context, Scheme, Options, result.Ticket);
232var cookieOptions = Options.Cookie.Build(Context);
265await Options.SessionStore.RenewAsync(_sessionKey, ticket, Context, Context.RequestAborted);
282Context,
305Context,
343await Options.SessionStore.RenewAsync(_sessionKey, ticket, Context, Context.RequestAborted);
347_sessionKey = await Options.SessionStore.StoreAsync(ticket, Context, Context.RequestAborted);
360Context,
366Context,
393await Options.SessionStore.RemoveAsync(_sessionKey, Context, Context.RequestAborted);
397Context,
406Context,
444new RedirectContext<CookieAuthenticationOptions>(Context, Scheme, Options, properties, redirectUri));
463var redirectContext = new RedirectContext<CookieAuthenticationOptions>(Context, Scheme, Options, properties, BuildRedirectUri(accessDeniedUri));
477var redirectContext = new RedirectContext<CookieAuthenticationOptions>(Context, Scheme, Options, properties, BuildRedirectUri(loginUri));
484var 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)
128var form = await Request.ReadFormAsync(Context.RequestAborted);
136var remoteSignOutContext = new RemoteSignOutContext(Context, Scheme, Options, message);
166var principal = (await Context.AuthenticateAsync(Options.SignOutScheme))?.Principal;
205await Context.SignOutAsync(Options.SignOutScheme);
218await Context.SignOutAsync(target, properties);
228_configuration = await Options.ConfigurationManager.GetConfigurationAsync(Context.RequestAborted);
252message.IdTokenHint = await Context.GetTokenAsync(Options.SignOutScheme, OpenIdConnectParameterNames.IdToken);
254var redirectContext = new RedirectContext(Context, Scheme, Options, properties)
330var signOut = new RemoteSignOutContext(Context, Scheme, Options, message)
370var location = Context.Response.Headers.Location;
376var cookie = Context.Response.Headers.SetCookie;
400_configuration = await Options.ConfigurationManager.GetConfigurationAsync(Context.RequestAborted);
463var redirectContext = new RedirectContext(Context, Scheme, Options, properties)
563var context = new PushedAuthorizationContext(Context, Scheme, Options, parRequest, properties);
600var parResponseMessage = await Backchannel.SendAsync(requestMessage, Context.RequestAborted);
619var parResponseString = await parResponseMessage.Content.ReadAsStringAsync(Context.RequestAborted);
667var form = await Request.ReadFormAsync(Context.RequestAborted);
756_configuration = await Options.ConfigurationManager.GetConfigurationAsync(Context.RequestAborted);
996var responseMessage = await Backchannel.SendAsync(requestMessage, Context.RequestAborted);
1018var responseContent = await responseMessage.Content.ReadAsStringAsync(Context.RequestAborted);
1062var responseMessage = await Backchannel.SendAsync(requestMessage, Context.RequestAborted);
1064var userInfoResponse = await responseMessage.Content.ReadAsStringAsync(Context.RequestAborted);
1164var cookieOptions = Options.NonceCookie.Build(Context, TimeProvider.GetUtcNow());
1196var cookieOptions = Options.NonceCookie.Build(Context, TimeProvider.GetUtcNow());
1214var context = new MessageReceivedContext(Context, Scheme, Options, properties)
1237var context = new TokenValidatedContext(Context, Scheme, Options, user, properties)
1282var context = new AuthorizationCodeReceivedContext(Context, Scheme, Options, properties)
1314var context = new TokenResponseReceivedContext(Context, Scheme, Options, user, properties)
1340var context = new UserInformationReceivedContext(Context, Scheme, Options, principal, properties)
1364var 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)