Skip to content
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

If user sets TokenValidationParameters.TokenReplayValidator, it should be called #1100

Closed
brentschmaltz opened this issue Jan 23, 2019 · 2 comments · Fixed by #1272
Closed
Assignees
Labels
Enhancement The issue is a new feature Internal Indicates issue was opened by the IdentityModel team P1 More important, prioritize highly
Milestone

Comments

@brentschmaltz
Copy link
Member

If a users has set TokenValidationParameters.TokenReplayValidator delegate, it should be called.
Currently, the user has to set the delegate AND set TokenValidationParameters.ValidateTokenReplay

This could be solved by setting the default to true || examining both values.

@brentschmaltz brentschmaltz added this to the 5.4.1 milestone Jan 23, 2019
@brentschmaltz brentschmaltz added P1 More important, prioritize highly Internal Indicates issue was opened by the IdentityModel team labels Jan 23, 2019
@mafurman mafurman self-assigned this May 1, 2019
@mafurman
Copy link
Member

We will make this change in 6.x after we add "appsettings" runtime control. We want the Validators to have consistent behavior.

If the user sets a Validator we call it, and then we check the associated bool afterwards.

if (ValidatorDelegate)
    call delegate
if (!Validate)
    return
....

@mafurman mafurman modified the milestones: 5.5.0, 6.x May 16, 2019
@henrik-me henrik-me added the Enhancement The issue is a new feature label Jun 21, 2019
@brentschmaltz brentschmaltz modified the milestones: 6.x, 5.6.0 Oct 10, 2019
@mafurman
Copy link
Member

We should also add in comments on the TokenValidationParameters that clearly indicate that the 'Validate' properties refer to our default validation behavior, and that the 'ValidatorDelegate' properties take over validation (and do not occur in addition to our default validation behavior).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement The issue is a new feature Internal Indicates issue was opened by the IdentityModel team P1 More important, prioritize highly
Projects
None yet
3 participants