Add hashing and other security features #12
@ -86,4 +86,14 @@ public class AuthService(ICacheService cache, IAccessToken accessTokenService, I
|
|||||||
RefreshToken = GenerateRefreshToken()
|
RefreshToken = GenerateRefreshToken()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task LogoutAsync(string fingerprint, CancellationToken cancellation = default)
|
||||||
|
{
|
||||||
|
var authTokenStruct = await cache.GetAsync<AuthToken>(GetAuthCacheKey(fingerprint), cancellation);
|
||||||
|
if (authTokenStruct == null) return;
|
||||||
|
|
||||||
|
await RevokeAccessToken(authTokenStruct.AccessToken);
|
||||||
|
|
||||||
|
await cache.RemoveAsync(fingerprint, cancellation);
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user