using JdeScoping.Core.Models.Auth;
namespace JdeScoping.Client.Auth;
///
/// Interface for managing authentication state in the Blazor client.
/// Extracted from AuthStateProvider for testability.
///
public interface IAuthStateProvider
{
///
/// Called after successful login to update auth state and persist user info.
///
/// Authenticated user info from the server.
Task MarkUserAsAuthenticated(UserInfoDto user);
///
/// Notifies that authentication state has changed, triggering a re-evaluation.
///
void NotifyAuthenticationStateChanged();
///
/// Logs out the user by removing cached data and notifying of state change.
///
Task LogoutAsync();
///
/// Gets the current username from the cached user info.
///
/// The username if authenticated, null otherwise.
Task GetUsernameAsync();
}