using Connected.Security.Identity; namespace Connected.Security.Authentication; internal class AuthenticationResult : IAuthenticationResult { public string? Token { get; init; } public bool Success { get; init; } public AuthenticationResultReason Reason { get; init; } public IUser? User { get; init; } public static IAuthenticationResult Fail(AuthenticationResultReason reason) { return new AuthenticationResult { Success = false, Reason = reason }; } public static IAuthenticationResult OK(IUser user, string token) { return new AuthenticationResult { Success = true, Token = token, User = user }; } }