fix: No token refresh or revocation mechanism~
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
public class RefreshToken
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Token { get; set; } = null!;
|
||||
public Guid UserId { get; set; }
|
||||
public DateTimeOffset ExpiresAt { get; set; }
|
||||
public DateTimeOffset CreatedAt { get; set; }
|
||||
public DateTimeOffset? RevokedAt { get; set; }
|
||||
|
||||
public ClinicalUser User { get; set; } = null!;
|
||||
}
|
||||
@@ -12,6 +12,8 @@ public enum AuditAction
|
||||
UserLogin,
|
||||
AuthorizationDenied,
|
||||
AlertFeedbackSubmitted,
|
||||
UserLogout,
|
||||
TokenRefreshed,
|
||||
}
|
||||
|
||||
public static class AuditActionExtensions
|
||||
@@ -30,6 +32,8 @@ public static class AuditActionExtensions
|
||||
AuditAction.UserLogin => "USER_LOGIN",
|
||||
AuditAction.AuthorizationDenied => "AUTHORIZATION_DENIED",
|
||||
AuditAction.AlertFeedbackSubmitted => "ALERT_FEEDBACK_SUBMITTED",
|
||||
AuditAction.UserLogout => "USER_LOGOUT",
|
||||
AuditAction.TokenRefreshed => "TOKEN_REFRESHED",
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(a))
|
||||
};
|
||||
|
||||
@@ -47,6 +51,8 @@ public static class AuditActionExtensions
|
||||
"USER_LOGIN" => AuditAction.UserLogin,
|
||||
"AUTHORIZATION_DENIED" => AuditAction.AuthorizationDenied,
|
||||
"ALERT_FEEDBACK_SUBMITTED" => AuditAction.AlertFeedbackSubmitted,
|
||||
"USER_LOGOUT" => AuditAction.UserLogout,
|
||||
"TOKEN_REFRESHED" => AuditAction.TokenRefreshed,
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(v))
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user