Add authentication methods to access protected resources #15

Merged
Wesser merged 13 commits from feat/auth into release/v1.0.0 2024-06-28 23:14:18 +03:00
Showing only changes of commit 8d4c482bbd - Show all commits

View File

@ -72,7 +72,7 @@ public class AuthService(ICacheService cache, IAccessToken accessTokenService, I
authToken.UserAgent != request.UserAgent && authToken.UserAgent != request.UserAgent &&
authToken.Ip != request.Ip) authToken.Ip != request.Ip)
{ {
await cache.RemoveAsync(request.Fingerprint, cancellation); await cache.RemoveAsync(GetAuthCacheKey(request.Fingerprint), cancellation);
await RevokeAccessToken(authToken.AccessToken); await RevokeAccessToken(authToken.AccessToken);
throw new SecurityException(request.Fingerprint); throw new SecurityException(request.Fingerprint);