Fix ValidationParameters Inconsistencies #3173
Conversation
| /// all available keys will be tried. | ||
| /// </summary> | ||
| /// <remarks>Default is false.</remarks> | ||
| [DefaultValue(true)] |
There was a problem hiding this comment.
This also needs to be set in the empty constructor.
There was a problem hiding this comment.
It might be better to set the value on the property as if a new ctor is created it may be missed.
It would be a good idea to set the other properties: LogTokenId, TryAllDecryptionKeys
Add the attribute [DefaultValue(...)] as some of the bool properties as missing.
public bool TryAllIssuerSigningKeys { get; set; } = true;
| @@ -530,6 +532,7 @@ public TokenReplayValidationDelegate TokenReplayValidator | |||
| /// all available keys will be tried. | |||
| /// </summary> | |||
| /// <remarks>Default is false.</remarks> | |||
There was a problem hiding this comment.
Please update the remarks to state that the default value is now true.
|
Few unit tests are failing that require investigation. |
|
@omidmloo we are working on a rather large change at the moment to get the API's for the new model completed. We may want to wait until this PR is in, before additional cleanup. |
Fix ValidationParameters Inconsistencies
Summary
This PR fixes inconsistencies in
ValidationParametersby ensuring properties are copied correctly fromTokenValidationParameters.Description
TryAllIssuerSigningKeysproperty was not being copied in theValidationParameters(ValidationParameters other)constructor.TryAllIssuerSigningKeys.TryAllIssuerSigningKeyswasfalseby default, whereas it wastruein the current model. This has been aligned accordingly.ValidateActorinValidationParametersfor consistency.Fixes #3131