Invalidate JWTs on profile changes
This commit is contained in:
@@ -2,11 +2,12 @@ namespace RecNet.Application.Common.Tokens;
|
||||
|
||||
public sealed record TokenVerifyResult(
|
||||
bool Succeeded,
|
||||
Guid? ProfileId)
|
||||
Guid? ProfileId,
|
||||
Guid? TokenVersion)
|
||||
{
|
||||
public static TokenVerifyResult Success(Guid profileId)
|
||||
=> new(true, profileId);
|
||||
public static TokenVerifyResult Success(Guid profileId, Guid tokenVersion)
|
||||
=> new(true, profileId, tokenVersion);
|
||||
|
||||
public static TokenVerifyResult Failure()
|
||||
=> new(false, null);
|
||||
=> new(false, null, null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user