How to have custom validation of a JWT bearer token early in the pipeline
问题 I have in incoming bearer token that has an incorrect audience. There is enough information in the token via other claims that prove what the audience should be. I was hoping to fix it up early so that I could still take advantage of the JwtBearerOptions.TokenValidationParameters.ValidateAudience = true; JwtBearerOptions.TokenValidationParameters.ValidAudiences ={"the right one"}; I can hook the OnTokenValidated event, and rewrite the principal, but that is too late. Earlier in the pipeline