public static TokenValidationParameters ValidationParameters(this JwtConfiguration config) { return(new TokenValidationParameters { ValidateIssuer = true, ValidIssuer = config.Issuer, ValidateAudience = true, ValidAudience = config.Audience, ValidateIssuerSigningKey = true, IssuerSigningKey = config.SigningKey(), RequireExpirationTime = false, ValidateLifetime = true, ClockSkew = TimeSpan.Zero }); }
private static SigningCredentials SigningCredentials(this JwtConfiguration config) { return(new SigningCredentials(config.SigningKey(), SecurityAlgorithms.HmacSha256)); }