diff --git a/src/Microsoft.IdentityModel.Tokens/TokenValidationParameters.cs b/src/Microsoft.IdentityModel.Tokens/TokenValidationParameters.cs index c7f2857186..86888dc552 100644 --- a/src/Microsoft.IdentityModel.Tokens/TokenValidationParameters.cs +++ b/src/Microsoft.IdentityModel.Tokens/TokenValidationParameters.cs @@ -83,6 +83,9 @@ protected TokenValidationParameters(TokenValidationParameters other) SaveSigninToken = other.SaveSigninToken; SignatureValidator = other.SignatureValidator; SignatureValidatorUsingConfiguration = other.SignatureValidatorUsingConfiguration; +#if SUPPORTS_TIME_PROVIDER + TimeProvider = other.TimeProvider; +#endif TokenDecryptionKey = other.TokenDecryptionKey; TokenDecryptionKeyResolver = other.TokenDecryptionKeyResolver; TokenDecryptionKeys = other.TokenDecryptionKeys; @@ -349,7 +352,7 @@ public virtual ClaimsIdentity CreateClaimsIdentity(SecurityToken securityToken, /// This means that no default 'issuer' validation will occur. /// Even if is false, this delegate will still be called. /// If both and are set, IssuerValidatorUsingConfiguration takes - /// priority. + /// priority. /// public IssuerValidator IssuerValidator { get; set; } @@ -537,6 +540,16 @@ public string RoleClaimType /// public SignatureValidatorUsingConfiguration SignatureValidatorUsingConfiguration { get; set; } +#if SUPPORTS_TIME_PROVIDER + /// + /// Gets or sets the time provider used for time validation. + /// + /// + /// If not set, validators will fall back to using the class to obtain the current time. + /// + public TimeProvider TimeProvider { get; set; } +#endif + /// /// Gets or sets the that is to be used for decryption. /// @@ -646,7 +659,7 @@ public string RoleClaimType /// Gets or sets a boolean that controls if validation of the that signed the securityToken is called. /// /// It is possible for tokens to contain the public key needed to check the signature. For example, X509Data can be hydrated into an X509Certificate, - /// which can be used to validate the signature. In these cases it is important to validate the SigningKey that was used to validate the signature. + /// which can be used to validate the signature. In these cases it is important to validate the SigningKey that was used to validate the signature. /// This boolean only applies to default signing key validation. If is set, it will be called regardless of whether this /// property is true or false. /// The default is false. @@ -676,7 +689,7 @@ public string RoleClaimType /// /// Gets or sets a boolean to control if the token replay will be validated during token validation. - /// + /// /// /// This boolean only applies to default token replay validation. If is set, it will be called regardless of whether this /// property is true or false.