3 instantiations of AuthenticationState
Microsoft.AspNetCore.Components.Endpoints (1)
Rendering\EndpointHtmlRenderer.cs (1)
97var authenticationState = new AuthenticationState(httpContext.User);
Microsoft.AspNetCore.Components.Server (2)
Circuits\CircuitHost.cs (1)
637var authenticationState = new AuthenticationState(user);
Circuits\RevalidatingServerAuthenticationStateProvider.cs (1)
105var anonymousState = new AuthenticationState(anonymousUser);
50 references to AuthenticationState
Aspire.Dashboard (4)
Components\Controls\UserProfile.razor.cs (2)
27public required Task<AuthenticationState> AuthenticationState { get; set; } 44var authState = await AuthenticationState;
Components\Pages\Login.razor.cs (2)
41public Task<AuthenticationState>? AuthenticationState { get; set; } 59var state = await authStateTask;
Aspire.Dashboard.Components.Tests (1)
Pages\LoginTests.cs (1)
32var tcs = new TaskCompletionSource<AuthenticationState>(TaskCreationOptions.RunContinuationsAsynchronously);
Microsoft.AspNetCore.Components.Authorization (34)
_generated\0\CascadingAuthenticationState_razor.g.cs (6)
32System.Threading.Tasks.Task<AuthenticationState> 38__builder.AddComponentParameter(1, nameof(global::Microsoft.AspNetCore.Components.CascadingValue<System.Threading.Tasks.Task<AuthenticationState>>. 46), global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<System.Threading.Tasks.Task<AuthenticationState>>( 55__builder.AddComponentParameter(2, nameof(global::Microsoft.AspNetCore.Components.CascadingValue<System.Threading.Tasks.Task<AuthenticationState>>. 78private Task<AuthenticationState>? _currentAuthenticationStateTask; 94private void OnAuthenticationStateChanged(Task<AuthenticationState> newAuthStateTask)
AuthenticationState.cs (1)
14/// Constructs an instance of <see cref="AuthenticationState"/>.
AuthenticationStateData.cs (2)
9/// A JSON-serializable type that represents the data that is used to create an <see cref="AuthenticationState"/>. 14/// The client-readable claims that describe the <see cref="AuthenticationState.User"/>.
AuthenticationStateProvider.cs (8)
12/// Asynchronously gets an <see cref="AuthenticationState"/> that describes the current user. 14/// <returns>A task that, when resolved, gives an <see cref="AuthenticationState"/> instance that describes the current user.</returns> 15public abstract Task<AuthenticationState> GetAuthenticationStateAsync(); 18/// An event that provides notification when the <see cref="AuthenticationState"/> 26/// <param name="task">A <see cref="Task"/> that supplies the updated <see cref="AuthenticationState"/>.</param> 27protected void NotifyAuthenticationStateChanged(Task<AuthenticationState> task) 38/// <param name="task">A <see cref="Task"/> that supplies the updated <see cref="AuthenticationState"/>.</param> 39public delegate void AuthenticationStateChangedHandler(Task<AuthenticationState> task);
AuthorizeRouteView.cs (6)
23private static readonly RenderFragment<AuthenticationState> _defaultNotAuthorizedContent 29private readonly RenderFragment<AuthenticationState> _renderAuthorizedDelegate; 30private readonly RenderFragment<AuthenticationState> _renderNotAuthorizedDelegate; 52public RenderFragment<AuthenticationState>? NotAuthorized { get; set; } 67private Task<AuthenticationState>? ExistingCascadedAuthenticationState { get; set; } 112private void RenderNotAuthorizedInDefaultLayout(RenderTreeBuilder builder, AuthenticationState authenticationState)
AuthorizeViewCore.cs (5)
15private AuthenticationState? currentAuthenticationState; 21[Parameter] public RenderFragment<AuthenticationState>? ChildContent { get; set; } 26[Parameter] public RenderFragment<AuthenticationState>? NotAuthorized { get; set; } 32[Parameter] public RenderFragment<AuthenticationState>? Authorized { get; set; } 44[CascadingParameter] private Task<AuthenticationState>? AuthenticationState { get; set; }
CascadingAuthenticationStateServiceCollectionExtensions.cs (3)
22return serviceCollection.AddCascadingValue<Task<AuthenticationState>>(services => 29private sealed class AuthenticationStateCascadingValueSource : CascadingValueSource<Task<AuthenticationState>>, IDisposable 43private void HandleAuthenticationStateChanged(Task<AuthenticationState> newAuthStateTask)
IHostEnvironmentAuthenticationStateProvider.cs (3)
10/// it will receive the <see cref="AuthenticationState"/> returned by <see cref="AuthenticationStateProvider.GetAuthenticationStateAsync"/> 17/// <param name="authenticationStateTask">A task that resolves with the updated <see cref="AuthenticationState"/>.</param> 18void SetAuthenticationState(Task<AuthenticationState> authenticationStateTask);
Microsoft.AspNetCore.Components.Endpoints (5)
DependencyInjection\ServerAuthenticationStateProvider.cs (3)
13private Task<AuthenticationState>? _authenticationStateTask; 16public override Task<AuthenticationState> GetAuthenticationStateAsync() 21public void SetAuthenticationState(Task<AuthenticationState> authenticationStateTask)
Rendering\EndpointHtmlRenderer.cs (2)
97var authenticationState = new AuthenticationState(httpContext.User); 104Task<AuthenticationState>? authStateTask = null;
Microsoft.AspNetCore.Components.Server (6)
Circuits\CircuitHost.cs (1)
637var authenticationState = new AuthenticationState(user);
Circuits\RevalidatingServerAuthenticationStateProvider.cs (5)
54/// <param name="authenticationState">The current <see cref="AuthenticationState"/>.</param> 57protected abstract Task<bool> ValidateAuthenticationStateAsync(AuthenticationState authenticationState, CancellationToken cancellationToken); 59private async Task RevalidationLoop(Task<AuthenticationState> authenticationStateTask, CancellationToken cancellationToken) 63var authenticationState = await authenticationStateTask; 105var anonymousState = new AuthenticationState(anonymousUser);