Class AppPrincipalFromAuthenticationState
Rebuilds the AppPrincipal from the authentication state serialized by the Blazor server, and sets it in the IApplicationContext.
[Export(typeof(IAppPrincipalAuthenticationStateProvider))]
[Shared]
public class AppPrincipalFromAuthenticationState : IAppPrincipalAuthenticationStateProvider
- Inheritance
-
AppPrincipalFromAuthenticationState
- Implements
- Inherited Members
Constructors
AppPrincipalFromAuthenticationState(IClaimProfileFiller, IClaimAuthorizationFiller, IApplicationContext)
Initializes a new instance of the AppPrincipalFromAuthenticationState class.
public AppPrincipalFromAuthenticationState(IClaimProfileFiller claimsFiller, IClaimAuthorizationFiller authorizationFiller, IApplicationContext applicationContext)
Parameters
claimsFillerIClaimProfileFillerThe filler that builds the user profile from the claims.
authorizationFillerIClaimAuthorizationFillerThe filler that builds the authorization from the claims.
applicationContextIApplicationContextThe application context that receives the principal.
Properties
DefaultAuthenticationState
Gets an authentication state for an anonymous user: a principal with an empty identity and no operation.
public static AuthenticationState DefaultAuthenticationState { get; }
Property Value
Methods
DeserializeAuthenticationStateAsync(AuthenticationStateData?)
Builds the authentication state from the serialized data.
public Task<AuthenticationState> DeserializeAuthenticationStateAsync(AuthenticationStateData? authenticationStateData)
Parameters
authenticationStateDataAuthenticationStateDataThe claims received from the server, or null for an anonymous user.
Returns
- Task<AuthenticationState>
The authentication state.