Skip to content

Commit

Permalink
fix SecurityTokenValidationException to be SecurityTokenInvalidAudien…
Browse files Browse the repository at this point in the history
…ceException in validateAudience (#256)
  • Loading branch information
jennyf19 authored Jun 24, 2020
1 parent 98b08a9 commit 35d83f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public void RegisterAudienceValidation(
return audiences.Contains(validAudience);
}

throw new SecurityTokenValidationException("Token does not contain a valid audience. ");
throw new SecurityTokenInvalidAudienceException("Token contains an invalid audience. ");
}

// Cases where developers explicitly provided the valid audiences
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ private void AssertAudienceProvidedInValidAudiences()

private void AssertFailureOnInvalidAudienceInToken()
{
Assert.Throws<SecurityTokenValidationException>(() => _registerValidAudience.ValidateAudience(
Assert.Throws<SecurityTokenInvalidAudienceException>(() => _registerValidAudience.ValidateAudience(
_validAudiences,
_token,
_validationParams));
Expand Down

0 comments on commit 35d83f6

Please sign in to comment.