private static TokenValidationParameters GetValidationParameters(ISecurityKeysContainer keysContainer)
 {
     return(new TokenValidationParameters
     {
         ValidateIssuerSigningKey = true,
         IssuerSigningKey = keysContainer.GetEncodingKey()
                            .GetKey(),
         ValidateIssuer = true,
         ValidIssuer = keysContainer.Issuer(),
         ValidateAudience = true,
         ValidAudience = keysContainer.Audience(),
         ValidateLifetime = true,
         ClockSkew = TimeSpan.FromSeconds(5)
     });
 }
Esempio n. 2
0
 public JwtTokenFactory(ISecurityKeysContainer securityKeysContainer)
 {
     _securityKeysContainer = securityKeysContainer;
 }
 public JwtTokenReader(ISecurityKeysContainer securityKeysContainer)
 {
     _securityKeysContainer = securityKeysContainer;
 }