Skip to content

Commit

Permalink
Fix over-reporting of IDX14100 stating "there are no dots" (#2618)
Browse files Browse the repository at this point in the history
  • Loading branch information
halter73 authored May 30, 2024
1 parent 7cdeadb commit 33c8c42
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ public override async Task<TokenValidationResult> ValidateTokenAsync(SecurityTok

var jwt = token as JsonWebToken;
if (jwt == null)
return new TokenValidationResult { Exception = LogHelper.LogExceptionMessage(new SecurityTokenMalformedException(LogMessages.IDX14100)), IsValid = false };
return new TokenValidationResult { Exception = LogHelper.LogArgumentException<ArgumentException>(nameof(token), $"{nameof(token)} must be a {nameof(JsonWebToken)}."), IsValid = false };

try
{
Expand Down Expand Up @@ -614,7 +614,7 @@ private static TokenValidationResult ReadToken(string token, TokenValidationPara
{
return new TokenValidationResult
{
Exception = LogHelper.LogExceptionMessage(new SecurityTokenMalformedException(LogMessages.IDX14100, ex)),
Exception = ex,
IsValid = false
};
}
Expand Down

0 comments on commit 33c8c42

Please sign in to comment.