public Handler(IDbContext context, IDbContext db, ITokenGenerator tokenGenerator) : base(context) { _db = db; _tokenGenerator = tokenGenerator; }
public LoginController(ITokenGenerator _tokenGenerator, IPasswordHasher _passwordHasher, IUserDAO userDAO) { tokenGenerator = _tokenGenerator; passwordHasher = _passwordHasher; this.userDAO = userDAO; }
public LoginController( UserManager <AppUserModel> userManager, ITokenGenerator tokenGenerator) { _userManager = userManager; _tokenGenerator = tokenGenerator; }
public CacheableTokenProvider(ITokenStorage tokenStorage, ITokenGenerator tokenGenerator, ITokenMetadataCacheStrategy tokenMetadataCacheStrategy) { _tokenMetadataCacheStrategy = tokenMetadataCacheStrategy; _cache = new InMemoryTokenStorage(); _generator = tokenGenerator; _storage = tokenStorage; }
public static ITokenGenerator Build(ILifetimeScope requestContainer, NancyContext context) { ITokenGenerator tokenGenerator = null; if (context.Request != null && context.Request.Headers[ACCEPT_TOKEN_ALGORITHM_HEADER] != null && context.Request.Headers[ACCEPT_TOKEN_ALGORITHM_HEADER].Contains(SecurityAlgorithms.RsaSha256)) { tokenGenerator = requestContainer.ResolveKeyed <ITokenGenerator>(SecurityAlgorithms.RsaSha256); } else { var settings = requestContainer.Resolve <TokenGeneratorSettings>(); if (string.IsNullOrWhiteSpace(settings.Alg)) { tokenGenerator = requestContainer.ResolveKeyed <ITokenGenerator>(SecurityAlgorithms.HmacSha256); } else { tokenGenerator = requestContainer.ResolveKeyed <ITokenGenerator>(settings.Alg); } } return(tokenGenerator); }
public AuthService(UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, ITokenGenerator tokenGenerator, IMapper mapper) { _userManager = userManager; _signInManager = signInManager; _tokenGenerator = tokenGenerator; _mapper = mapper; }
public TokenGeneratorTests() { _appSettings = new AppSettings { Secret = "STRINGU ALA BLANAOSSTRINGU ALA BLANAOS BLANAOSSTRINGU ALA BLANAOS BLANAOSSTRINGU ALA BLANAOS BLANAOSSTRINGU ALA BLANAOS", TokenLifetimeDays = 7 }; _tokenGenerator = new TokenGenerator(); User = new UserTokenDataModel { Id = 1, DisplayName = "testttt", Email = "*****@*****.**", UserRole = UserRole.Admin.ToString() }; Token = _tokenGenerator.Generate(_appSettings, User); Key = Encoding.ASCII.GetBytes(_appSettings.Secret); Validations = new TokenValidationParameters { ValidateIssuerSigningKey = true, IssuerSigningKey = new SymmetricSecurityKey(Key), ValidateIssuer = false, ValidateAudience = false }; Handler = new JwtSecurityTokenHandler(); }
public LoginUserHandler(IRead <UserDirectory> userDirectoryReader, ITokenGenerator tokenGenerator, IJWTService jwtService, PasswordService passwordService) { _userDirectoryReader = userDirectoryReader; _passwordService = passwordService; _tokenGenerator = tokenGenerator; _jwtService = jwtService; }
public Handler(UserManager <AppUser> userManager, IRoleAccessor roleAccessor, ITokenGenerator tokenGenerator, IUserAccessor userAccessor) { this.roleAccessor = roleAccessor; this.userManager = userManager; this.tokenGenerator = tokenGenerator; this.userAccessor = userAccessor; }
public DefaultAuthServer( IClientValidator clientValidator , ITokenGenerator tokenGenerator , IAuthCodeStore authCodeStore , ITokenInfoStore tokenStore , IStateStore stateStore , IAuthCodeGenerator authCodeGenerator , IResourceOwnerValidator resourceOwnerValidator , ILogger <DefaultAuthServer> logger , AuthServerOptions options , IPkceValidator pkceValidator , IConfiguration configuration ) { _clientValidator = clientValidator; _tokenGenerator = tokenGenerator; _resourceOwnerValidator = resourceOwnerValidator; _logger = logger; _authCodeStore = authCodeStore; _tokenStore = tokenStore; _stateStore = stateStore; _authCodeGenerator = authCodeGenerator; _pkceValidator = pkceValidator; _configuration = configuration; TokenRequestHandler = HandleTokenRequestAsync; AuthorizeRequestHandler = HandleAuthorizeRequestAsync; EndSessionRequestHandler = HandleEndSessionRequestAsync; ClearTokenRequestHandler = HandleClearTokenRequestAsync; AuthServerOptions = options; }
public AuthenticateHandler(IResponse response, IMapper mapper, ILoginContext loginContext, ITokenGenerator tokenGenerator) { this.response = response; this.mapper = mapper; this.loginContext = loginContext; this.tokenGenerator = tokenGenerator; }
public LoginService(IUnitOfWork unitOfWork, IMapper mapper, ITokenGenerator tokenGenerator, IOptions <Configuration> options) { this.unitOfWork = unitOfWork; this.mapper = mapper; this.tokenGenerator = tokenGenerator; this.options = options; }
public OAuthController(SignInManager <IdentityUser> signInManager, DataContext dataContext, ITokenGenerator tokenGenerator) { this.signInManager = signInManager; this.dataContext = dataContext; this.tokenGenerator = tokenGenerator; }
public TokenGeneratorTests() { _tokenGenerator = new TokenGenerator( _configuration.Object, _logger.Object, _repositoryUser.Object); }
public InMemoryNavigationManager(ITokenGenerator tokenGenerator) { _items = new ConcurrentDictionary <string, NavigationItem>(); _expireditems = new ConcurrentDictionary <string, NavigationItem>(); _privateTokenMap = new ConcurrentDictionary <string, string>(); _tokenGenerator = tokenGenerator; }
public UsersController(IApplicationUserRepository userRepository, IMapper mapper, ITokenGenerator tokenGenerator) { _userRepository = userRepository; _mapper = mapper; _tokenGenerator = tokenGenerator; }
public void SetUp() { this.knownUsers = new Dictionary<string, string>(); this.tokenGenerator = A.Fake<ITokenGenerator>(); this.testee = new LoginService(new UserAuthenticator(this.knownUsers, this.tokenGenerator)); }
public LoginService(UserManager <User> userManager, SignInManager <User> signInManager, ITokenGenerator tokenGenerator, IChannelManager channelManager) { _userManager = userManager; _signInManager = signInManager; _tokenGenerator = tokenGenerator; _channelManager = channelManager; }
public UsersController(UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, IMapper mapper, ITokenGenerator tokenGenerator) { _userManager = userManager; _signInManager = signInManager; _mapper = mapper; _tokenGenerator = tokenGenerator; }
public void SetUp() { this.knownUsers = new Dictionary <string, string>(); this.tokenGenerator = A.Fake <ITokenGenerator>(); this.testee = new LoginService(new UserAuthenticator(this.knownUsers, this.tokenGenerator)); }
public LoginController(ITokenGenerator _tokenGenerator, IPasswordHasher _passwordHasher, IUserDAO _userDAO, ICollectionDAO _collectionDAO) { tokenGenerator = _tokenGenerator; passwordHasher = _passwordHasher; userDAO = _userDAO; collectionDAO = _collectionDAO; }
public TokenController( [NotNull] ILogger <TokenController> logger, [NotNull] ITokenGenerator tokenGenerator) { this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); this.tokenGenerator = tokenGenerator ?? throw new ArgumentNullException(nameof(tokenGenerator)); }
public AssertionService(ILogger <AssertionService> logger, IDigitalSigner keyVault, ITokenGenerator tokenGenerator) { _logger = logger; _keyVault = keyVault; _tokenGenerator = tokenGenerator; }
public TokenController(VueContext db, SignInManager <AppUser> signInManager, UserManager <AppUser> userManager, ITokenGenerator tokenGenerator) { _signInManager = signInManager; _userManager = userManager; _tokenGenerator = tokenGenerator; _db = db; }
public SimpleDiscoveryDelegatingHandler(ITokenGenerator tokenGenerator , IMemoryCache memoryCache) { this.ContextId = Guid.NewGuid(); _tokenGenerator = tokenGenerator; _memoryCache = memoryCache; }
public LoginController(IContractorAccountRepository ContractorAccountRepository, ITokenGenerator TokenGenerator) { DbContext = new DissertationContext(); this.ContractorAccountRepository = new ContractorAccountRepository(DbContext); this.TokenGenerator = TokenGenerator; }
public TokenGenerator() { var fixture = new Fixture().Customize(new AutoMoqCustomization()); _tokenHandler = fixture.Create <Mock <JwtSecurityTokenHandler> >(); _tokenGenerator = new Infrastructure.TokenGenerator(_tokenHandler.Object); }
public TokenCreationService(ISystemClock clock, IKeyMaterialService keys, ILogger <TokenCreationService> logger, ITokenGenerator tokenGenerator) { Clock = clock; Keys = keys; Logger = logger; _tokenGenerator = tokenGenerator; }
public UpdateUserCommandHandler(UserManager <AuthUser> userManager, ITokenGenerator tokenGenerator, IUserManagementService userManagementService, ApplicationDbContext dbContext) { _userManager = userManager; _tokenGenerator = tokenGenerator; _userManagementService = userManagementService; _dbContext = dbContext; }
public AuthController(IConfiguration configuration, ITokenGenerator tokenGenerator, IMapper mapper, IUserService userService) { _mapper = mapper; _configuration = configuration; _tokenGenerator = tokenGenerator; _userService = userService; }
public UserService(UserManager <User> userManager, IUserDtoValidator userDtoValidator, SignInManager <User> signInManager, ITokenGenerator tokenGenerator) { _userManager = userManager; _userDtoValidator = userDtoValidator; _signInManager = signInManager; _tokenGenerator = tokenGenerator; }
public UserSessionFactory(IWriteableRepository writeableRepository, ITimeProvider timeProvider, ITokenGenerator<Guid> tokenGenerator, ITokenExpirationProvider tokenExpirationProvider) { _writeableRepository = writeableRepository; _timeProvider = timeProvider; _tokenGenerator = tokenGenerator; _tokenExpirationProvider = tokenExpirationProvider; }
internal AntiForgeryWorker([NotNull] IAntiForgeryTokenSerializer serializer, [NotNull] AntiForgeryOptions config, [NotNull] ITokenStore tokenStore, [NotNull] ITokenGenerator generator, [NotNull] ITokenValidator validator) { _serializer = serializer; _config = config; _tokenStore = tokenStore; _generator = generator; _validator = validator; }
public UserAuthenticator(IDictionary<string, string> knownUsers, ITokenGenerator tokenGenerator) { this.knownUsers = knownUsers; this.tokenGenerator = tokenGenerator; }
public CacheableTokenProvider(ITokenStorage tokenStorage, ITokenGenerator tokenGenerator) : this(tokenStorage, tokenGenerator, new TokenCacheStrategy()) { }
protected virtual void Configure(ConfigSource config) { tokenStore = (ITokenStore)ConfigureComponent(config.GetChild("tokenStore"), typeof(ITokenStore), typeof(HeapTokenStore)); callbackStore = (ICallbackStore)ConfigureComponent(config.GetChild("callbackStore"), typeof(ICallbackStore), typeof(HeapCallbackStore)); consumerStore = (IConsumerStore)ConfigureComponent(config.GetChild("consumerStore"), typeof(IConsumerStore), typeof(HeapConsumerStore)); requestIdValidator = (IRequestIdValidator)ConfigureComponent(config.GetChild("requestIdValidator"), typeof(IRequestIdValidator), typeof(HeapRequestIdValidator)); resourceAccessVerifier = (IResourceAccessVerifier)ConfigureComponent(config.GetChild("resourceAccessVerifier"), typeof(IResourceAccessVerifier), null); tokenGenerator = (ITokenGenerator)ConfigureComponent(config.GetChild("tokenGenerator"), typeof(ITokenGenerator), typeof(GuidTokenGenerator)); verificationProvider = (IVerificationProvider)ConfigureComponent(config.GetChild("verificationProvider"), typeof(IVerificationProvider), typeof(MD5HashVerificationProvider)); allowOutOfBandCallback = config.GetBoolean("oobCallback"); }
public TokenController(ITokenGenerator tokenGenerator) { _tokenGenerator = tokenGenerator; }