Skip to content

Commit

Permalink
fix: #dev exception jwt fix
Browse files Browse the repository at this point in the history
  • Loading branch information
marcinbator committed Oct 22, 2024
1 parent d779a6d commit b29e9fd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rag-2-backend/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#region

using System.Text;
using HttpExceptions.Exceptions;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.EntityFrameworkCore;
using Microsoft.IdentityModel.Tokens;
Expand Down Expand Up @@ -44,7 +45,7 @@
var token = header["Bearer ".Length..].Trim();

if (!string.IsNullOrEmpty(token) && await tokenBlacklistService.IsTokenBlacklistedAsync(token))
throw new UnauthorizedAccessException("Token is not valid");
throw new UnauthorizedException("Token is not valid");
}
};
});
Expand Down

0 comments on commit b29e9fd

Please sign in to comment.