Class AuthStatusViewComponent
- Namespace
 - Htmx.Components.AuthStatus
 
- Assembly
 - Htmx.Components.dll
 
View component that renders authentication status information for the current user.
public class AuthStatusViewComponent : ViewComponent
  - Inheritance
 - 
      
      
      AuthStatusViewComponent
 
- Inherited Members
 
- Extension Methods
 
Remarks
This component displays different content based on whether the user is authenticated, including user information, profile images, and login/logout links. The actual content and behavior are determined by the registered IAuthStatusProvider.
Constructors
AuthStatusViewComponent(IAuthStatusProvider, ViewPaths)
Initializes a new instance of the AuthStatusViewComponent class.
public AuthStatusViewComponent(IAuthStatusProvider authStatusProvider, ViewPaths viewPaths)
  Parameters
authStatusProviderIAuthStatusProviderThe provider that generates authentication status data.
viewPathsViewPathsThe configured view paths for rendering components.
Exceptions
- ArgumentNullException
 Thrown when any parameter is null.
Methods
InvokeAsync()
Invokes the view component to render authentication status.
public Task<IViewComponentResult> InvokeAsync()
  Returns
- Task<IViewComponentResult>
 A task that represents the asynchronous operation. The task result contains the view component result.