Table of Contents

Class DefaultAuthStatusProvider

Namespace
Htmx.Components.AuthStatus
Assembly
Htmx.Components.dll

Default implementation of IAuthStatusProvider that provides basic authentication status information.

public class DefaultAuthStatusProvider : IAuthStatusProvider
Inheritance
DefaultAuthStatusProvider
Implements
Inherited Members
Extension Methods

Remarks

This implementation extracts user information from the ClaimsPrincipal and provides default values for profile images and login URLs. Applications can replace this with custom implementations to integrate with specific authentication systems or user stores.

Methods

GetAuthStatusAsync(ClaimsPrincipal)

Gets authentication status information for the specified user.

public Task<AuthStatusViewModel> GetAuthStatusAsync(ClaimsPrincipal user)

Parameters

user ClaimsPrincipal

The user principal to get status information for.

Returns

Task<AuthStatusViewModel>

A task that represents the asynchronous operation. The task result contains the authentication status view model.

Exceptions

ArgumentNullException

Thrown when user is null.