-
Notifications
You must be signed in to change notification settings - Fork 384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Audience validation: remove exceptions #2655
Conversation
src/Microsoft.IdentityModel.Tokens/Validation/AudienceValidationResult.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.IdentityModel.Tokens/Validation/AudienceValidationResult.cs
Show resolved
Hide resolved
src/Microsoft.IdentityModel.Tokens/Validation/Validators.Audience.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.IdentityModel.Tokens/Validation/AudienceValidationResult.cs
Outdated
Show resolved
Hide resolved
…tual audience that passed validation. Updated tests
/// <returns>A <see cref="IssuerValidationResult"/>that contains the results of validating the issuer.</returns> | ||
/// <remarks>This delegate is not expected to throw.</remarks> | ||
internal delegate AudienceValidationResult ValidateAudience( | ||
IEnumerable<string> audiences, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How much work would it be to change IEnumberable to IList?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remember this call will arrive from
TokenHandler.ValidateTokenAsync(
string token,
TokenValidationParameters validationParameters,
CallContext callContext,
CancellationToken cancellationToken)
{
// ...
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to use IList on the new ValidateAudience method.
…l method remains IEnumerable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Audience validation: Remove exceptions
Removed exceptions thrown as part of audience validation.
Description