public RefreshTokenUseCase(IJwtFactory jwtFactory, ITokenFactory tokenFactory, IJwtTokenValidator tokenValidator, IUserReposytory userReposytory) { _jwtFactory = jwtFactory; _tokenFactory = tokenFactory; _jwtValidator = tokenValidator; _userReposytory = userReposytory; }
public JwtTokenHandler(ILogger <JwtTokenHandler> logger, IJwtTokenValidator jwtTokenValidator) { _jwtSecurityTokenHandler ??= new JwtSecurityTokenHandler(); _logger = logger; _jwtTokenValidator = jwtTokenValidator; }
public TokenFactory(IConnectionMultiplexer cache, IJwtTokenValidator jwtTokenValidator, AppConfigurationOptions configOptions) { _cache = cache; _jwtTokenValidator = jwtTokenValidator; _configOptions = configOptions; }
public ExchangeRefreshTokenUseCase(IJwtTokenValidator jwtTokenValidator, IUserRepository userRepository, IJwtFactory jwtFactory, ITokenFactory tokenFactory) { _jwtTokenValidator = jwtTokenValidator; _userRepository = userRepository; _jwtFactory = jwtFactory; _tokenFactory = tokenFactory; }
public AuthService(IUserRepository userRepository, IJwtFactory jwtFactory, ITokenFactory tokenFactory, IJwtTokenValidator jwtTokenValidator) { _userRepository = userRepository; _jwtFactory = jwtFactory; _tokenFactory = tokenFactory; _jwtTokenValidator = jwtTokenValidator; }
private void UseLocalSettings3() { var mock = Substitute.For <IJwtTokenValidatorParameters>(); mock.Audience.Returns(_resourceOwnerTokenProvider.LocalSettings3.Audience); mock.Issuers.Returns(_resourceOwnerTokenProvider.LocalSettings3.Issuers); _jwtTokenValidator = new JwtTokenValidator(_cacheManager, _httpRequestContext, mock, Substitute.For <ILogger>()); }
public RefreshTokenHandler(IJwtTokenValidator jwtTokenValidator, IJwtFactory jwtFactory, ITokenFactory tokenFactory, UserManager <ShopUser> userManager, AuthSettings authSettings) { _jwtTokenValidator = jwtTokenValidator; _jwtFactory = jwtFactory; _tokenFactory = tokenFactory; _userManager = userManager; _authSettings = authSettings; }
public AuthService(UserManager userManager, IRefreshTokenService refreshTokenService, IJwtFactory jwtFactory, IJwtTokenValidator jwtTokenValidator, JwtIssuerOptions jwtIssuerOptions) { _userManager = userManager; _refreshTokenService = refreshTokenService; _jwtFactory = jwtFactory; _jwtTokenValidator = jwtTokenValidator; _jwtIssuerOptions = jwtIssuerOptions; }
public ExchangeRefreshTokenUseCase(IJwtTokenValidator jwtTokenValidator, IUserRepository userRepository, IJwtFactory jwtFactory, ITokenFactory tokenFactory, IOptions <AuthSettings> authSettings) { _jwtTokenValidator = jwtTokenValidator; _userRepository = userRepository; _jwtFactory = jwtFactory; _tokenFactory = tokenFactory; _authSettings = authSettings.Value; }
public AuthService(UserManager <AppUser> userManager, AppDbContext dbContext, ITokenFactory tokenFactory, IJwtTokenFactory jwtTokenFactory, IJwtTokenValidator tokenValidator) { this.userManager = userManager; this.dbContext = dbContext; this.tokenFactory = tokenFactory; this.jwtTokenFactory = jwtTokenFactory; this.tokenValidator = tokenValidator; }
public SecurityDataProvider(IJwtTokenValidator tokenValidator, IHttpContextAccessor httpContextAccessor, IOptions <AuthSettings> authSettings, IRepository repository) { _tokenValidator = tokenValidator; _httpContextAccessor = httpContextAccessor; _repository = repository; _authSettings = authSettings.Value; }
public AuthService( IJwtTokenValidator jwtTokenValidator, IOptions <AuthSettings> authSettings, UserManager <ApplicationUser> userManager ) { _jwtTokenValidator = jwtTokenValidator; _authSettings = authSettings.Value; _userManager = userManager; }
public JwtFactory(IJwtTokenHandler jwtTokenHandler, IOptions <JwtIssuerOptions> jwtOptions, IJwtTokenValidator jwtTokenValidator, IOptions <JwtOption> jwtOption) { _jwtTokenHandler = jwtTokenHandler; _jwtOptions = jwtOptions.Value; _jwtTokenValidator = jwtTokenValidator; _jwtOption = jwtOption.Value; ThrowIfInvalidOptions(_jwtOptions); }
public AuthService(IOptions <AuthSettings> authSettings, IJwtFactory jwtFactory, ITokenFactory tokenFactory, IJwtTokenValidator jwtTokenValidator, IDefaultRepository <RefreshToken> refreshTokenRepository, IDefaultRepository <OAuth> oAuthRepository) { _authSettings = authSettings.Value; _jwtFactory = jwtFactory; _tokenFactory = tokenFactory; _jwtTokenValidator = jwtTokenValidator; _refreshTokenRepository = refreshTokenRepository; _oAuthRepository = oAuthRepository; }
public AuthService( IJwtTokenValidator jwtTokenValidator, IAppUsersRepository appUsersRepository, IJwtTokenFactory jwtTokenFactory, ITokenFactory tokenFactory, ISettings settings) { _jwtTokenValidator = jwtTokenValidator ?? throw new ArgumentNullException(nameof(jwtTokenValidator)); _appUsersRepository = appUsersRepository ?? throw new ArgumentNullException(nameof(appUsersRepository)); _jwtTokenFactory = jwtTokenFactory ?? throw new ArgumentNullException(nameof(jwtTokenFactory)); _tokenFactory = tokenFactory ?? throw new ArgumentNullException(nameof(tokenFactory)); _settings = settings ?? throw new ArgumentNullException(nameof(settings)); }
public ExchangeRefreshTokenHandler(IJwtTokenValidator jwtTokenValidator, IUserRepository userRepository, IJwtFactory jwtFactory, ITokenFactory tokenFactory, IUnitOfWork uow, IMediatorHandler bus, INotificationHandler <DomainNotification> notifications) : base(uow, bus, notifications) { _jwtTokenValidator = jwtTokenValidator; _userRepository = userRepository; _jwtFactory = jwtFactory; _tokenFactory = tokenFactory; Bus = bus; }
public AccountController( IMediator mediator, IJwtFactory jwtFactory, ITokenFactory tokenFactory, IJwtTokenValidator jwtTokenValidator, IOptions <AuthSettings> authSettings, ILogger <AccountController> logger) { _mediator = mediator; _jwtFactory = jwtFactory; _tokenFactory = tokenFactory; _jwtTokenValidator = jwtTokenValidator; _logger = logger; _authSettings = authSettings.Value; }
public AccountController( IJwtTokenValidator jwtTokenValidator, IOptions <AuthSettings> authSettings, UserManager <ApplicationUser> userManager, IUnitOfWork unitOfWork, IMapper mapper, IEmailService emailService ) { _jwtTokenValidator = jwtTokenValidator; _authSettings = authSettings.Value; _userManager = userManager; _unitOfWork = unitOfWork; _mapper = mapper; _emailService = emailService; }
public IdentityUserService(UserManager <IdentityUser> userManager, JwtSettings jwtSettings, IUserService service, RoleManager <IdentityRole> roleManager, IEmailMaker emailMaker, IJwtTokenValidator jwtTokenValidator) { _userManager = userManager; _jwtSettings = jwtSettings; _service = service; _roleManager = roleManager; _emailMaker = emailMaker; _jwtTokenValidator = jwtTokenValidator; }
public ExchangeRefreshTokenCommandHandler( IJwtTokenValidator jwtTokenValidator, IJwtFactory jwtFactory, ITokenFactory tokenFactory, IConfiguration configuration, AppDbContext appDbContext, IMachineDateTime dateTime, UserManager <IdentityUser> userManager ) { _jwtTokenValidator = jwtTokenValidator; _jwtFactory = jwtFactory; _tokenFactory = tokenFactory; _configurationSection = configuration.GetSection("AuthSettings"); _appDbContext = appDbContext; _dateTime = dateTime; _userManager = userManager; }
public UsersService( ApplicationDbContext identityDbContext, UserManager <AppUser> userManager, IMapper mapper, IJwtFactory jwtFactory, IOptions <JwtIssuerOptions> jwtOptions, ITokenFactory tokenFactory, IJwtTokenValidator jwtTokenValidator, IRepository <Customer> repository ) { this.identityDbContext = identityDbContext; this.userManager = userManager; this.mapper = mapper; this.jwtFactory = jwtFactory; this.jwtOptions = jwtOptions.Value; this.tokenFactory = tokenFactory; this.jwtTokenValidator = jwtTokenValidator; this.repository = repository; }
public AccountController( ILogger <AccountController> logger, IOptions <AuthSettings> authSettings, UnitOfWork unitOfWork, IJwtTokenValidator jwtTokenValidator, IJwtFactory jwtFactory, ITokenFactory tokenFactory, ICurrentUser currentUser) : base(unitOfWork, logger) { _logger = logger; _authSettings = authSettings.Value; _jwtFactory = jwtFactory; _tokenFactory = tokenFactory; _jwtTokenValidator = jwtTokenValidator; _currentUser = currentUser; _appUserRepo = new AppUserRepository(unitOfWork); _groupRepo = new AppGroupRepository(unitOfWork); }
// TO DO: Clean up the mess in the constructor public AuthController( UserManager <ApplicationUser> userManager, ITokenFactory tokenFactory, IJwtFactory jwtFactory, IJwtTokenValidator jwtTokenValidator, IOptions <JwtIssuerOptions> jwtOptions, IOptions <AuthSettings> authSettings, IMapper mapper, IRefreshTokenRepository refreshTokenRepository, IUnitOfWork unitOfWork ) { _userManager = userManager; _jwtFactory = jwtFactory; _tokenFactory = tokenFactory; _jwtTokenValidator = jwtTokenValidator; _jwtOptions = jwtOptions.Value; _authSettings = authSettings.Value; _mapper = mapper; _refreshTokenRepository = refreshTokenRepository; _unitOfWork = unitOfWork; }