auth token endpoint added

This commit is contained in:
2026-02-05 23:51:49 +01:00
Unverified
parent 930f73d83d
commit c5823dc6fc
9 changed files with 144 additions and 25 deletions

View File

@@ -0,0 +1,21 @@
namespace TimetableDesigner.Backend.Services.Authentication.Core.Commands.AuthToken;
public record AuthTokenResult
{
public bool IsSuccess { get; }
public string? AccessToken { get; }
public string? RefreshToken { get; }
private AuthTokenResult(bool isSuccess, string? accessToken, string? refreshToken)
{
IsSuccess = isSuccess;
AccessToken = accessToken;
RefreshToken = refreshToken;
}
public static AuthTokenResult Success(string accessToken, string refreshToken) =>
new AuthTokenResult(true, accessToken, refreshToken);
public static AuthTokenResult Failure() =>
new AuthTokenResult(false, null, null);
}