public CryptoProvider(ISymmetricKeyProvider keyProvider, IIssuerConfig issuerConfig, IConsumerConfig consumerConfig, ICngKeyProvider cngKeyProvider, IEccPublicKeyProvider eccPublicKeyProvider, IRsaPublicKeyProvider rsaPublicKeyProvider) { this.issuerConfig = issuerConfig; _keyProvider = keyProvider; _consumerConfig = consumerConfig; _cngKeyProvider = cngKeyProvider; _eccPublicKeyProvider = eccPublicKeyProvider; _rsaPublicKeyProvider = rsaPublicKeyProvider; }
public GenerateRefreshTokenCommand(JwtConfig rTokenConfig, ISymmetricKeyProvider symmetricKeyProvider, ISecretGenerator tokenIdGenerator, IMongoCollection <AccountRTokenInfo> accountRTokenRepo, ILogger logger) { _logger = logger; _rTokenConfig = rTokenConfig; _symmetricKeyProvider = symmetricKeyProvider; _tokenIdGenerator = tokenIdGenerator; _accountRTokenRepo = accountRTokenRepo; }
public GenerateShortTokenCommand(ITokenExtractor refreshTokenExtracter, ICachedRepo <string> revokedTokenRepo, ISymmetricKeyProvider symmetricKeyProvider, ISecretGenerator tokenIdGenerator, JwtConfig shortTokenConfig, ILogger logger) { _refreshTokenExtracter = refreshTokenExtracter; _revokedTokenRepo = revokedTokenRepo; _symmetricKeyProvider = symmetricKeyProvider; _tokenIdGenerator = tokenIdGenerator; _shortTokenConfig = shortTokenConfig; _logger = logger; }
public TokenExtractor(JwtConfig refreshTokenConfig, ISymmetricKeyProvider symmetricKeyProvider) { _refreshTokenConfig = refreshTokenConfig ?? throw new ArgumentNullException("refreshTokenConfig"); _symmetricKeyProvider = symmetricKeyProvider ?? throw new ArgumentNullException("symmetricKeyProvider"); }
public AesCryptoStreamProvider(ISymmetricKeyProvider keyProvider, string defaultKeyId, PaddingMode paddingMode = PaddingMode.PKCS7) { _paddingMode = paddingMode; _keyProvider = keyProvider; _defaultKeyId = defaultKeyId; }
/// <summary> /// Initializes a new instance of the <see cref="JwtBearerTokenService"/> class, with the specified key provider and JWT configuration. /// </summary> /// <param name="provider">The provider for the symmetric key used when issuing a JWT.</param> /// <param name="configuration">The configuration used to create the issued tokens.</param> public JwtBearerTokenService(ISymmetricKeyProvider provider, JwtConfiguration configuration) { this.provider = provider ?? throw new ArgumentNullException(nameof(provider)); this.configuration = configuration ?? throw new ArgumentNullException(nameof(configuration)); }
public HmacSigning(ISymmetricKeyProvider keyProvider, SigningAlgorithm algorithm) { _keyProvider = keyProvider; _algorithm = algorithm; }
public JwtBearerConfigProvider(JwtConfig jwtConfig, ISymmetricKeyProvider symmetricKeyProvider) { _jwtConfig = jwtConfig; _symmetricKeyProvider = symmetricKeyProvider; }