private static void ConfigureTokenValidationParameters(TokenValidationParameters validationParameters, JwtBearerTokenOptions tokenOptions, SigningOptions signingOptions) { validationParameters.IssuerSigningKey = signingOptions.SecurityKey; validationParameters.ValidAudience = tokenOptions.Audience; validationParameters.ValidIssuer = tokenOptions.Issuer; validationParameters.ValidateIssuerSigningKey = true; validationParameters.ValidateLifetime = true; validationParameters.ClockSkew = TimeSpan.Zero; }
public JwtBearerGenerator(IOptions <JwtBearerTokenOptions> jwtBearerTokenOptions, IOptions <SigningOptions> signingOptions) { _jwtBearerTokenOptions = jwtBearerTokenOptions.Value; _signingOptions = signingOptions.Value; }