Table of Contents

Class AuthStatusViewModel

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

View model that contains authentication status information for display in views.

public class AuthStatusViewModel
Inheritance
AuthStatusViewModel
Inherited Members
Extension Methods

Remarks

This model is used by authentication status views to display user information and authentication-related UI elements such as login links and user avatars.

Properties

IsAuthenticated

Gets or sets a value indicating whether the current user is authenticated.

public bool IsAuthenticated { get; set; }

Property Value

bool

true if the user is authenticated; otherwise, false.

LoginUrl

Gets or sets the URL to redirect users to for authentication.

public string? LoginUrl { get; set; }

Property Value

string

The login URL, or null if login is not applicable.

ProfileImageUrl

Gets or sets the URL of the user's profile image.

public string? ProfileImageUrl { get; set; }

Property Value

string

A URL pointing to the user's profile image, or null if no image is available.

UserName

Gets or sets the display name of the authenticated user.

public string? UserName { get; set; }

Property Value

string

The user's display name, or null if not authenticated or if no name is available.