Exemplo n.º 1
0
 public JwtGenerator(JwtConfig jwtConfig)
 {
     _tokenName         = jwtConfig.TokenName;
     _secret            = jwtConfig.Secret;
     _issuer            = jwtConfig.Issuer;
     _durationInMinutes = jwtConfig.DurationInMinutes;
 }
Exemplo n.º 2
0
 public static JwtAuthTicketFormat Create(JwtConfig jwtConfig,
                                          IDataSerializer <AuthenticationTicket> ticketSerializer,
                                          IDataProtector dataProtector)
 {
     return(new JwtAuthTicketFormat(
                new JwtOptions(jwtConfig.TokenName, jwtConfig),
                ticketSerializer,
                dataProtector));
 }
Exemplo n.º 3
0
 public JwtOptions(string tokenName, JwtConfig jwtConfig)
 {
     ValidationParameters = jwtConfig.ToTokenValidationParameters();
     TokenName            = tokenName;
 }