//Highrise.Api _highrise; public ShopifyController(ITokenHandler tokenStore) : base(tokenStore) { _orders = new Orders(); _items = new OrderItems(); //_highrise = new Highrise.Api("XYZ", "your_domain"); }
public ApplicationController(ITokenHandler tokenStore, ILogger logger) { TokenStore = tokenStore; Logger = logger; //initialize this //ViewBag.CurrentUser = CurrentUser ?? new {Email = ""}; }
public ApplicationController(ITokenHandler tokenStore) { TokenStore = tokenStore; Logger = new NLogger(); //initialize this ViewBag.CurrentUser = CurrentUser ?? new { Email = "" }; }
public TokenEvaluator(ITokenHandler tokenHandler) { if (tokenHandler == null) { throw new ArgumentNullException("tokenHandler"); } _tokenHandler = tokenHandler; }
public AuthUser(ILoginRepository loginRepository, IUserRepository userRepository, ISubscriptionRepository subscriptionRepository, ITokenHandler tokenHandler, ISubscriptionTypeRepository subscriptionTypeRepository, CredentialsInput credentialsInput) { this.loginRepository = loginRepository; this.userRepository = userRepository; this.subscriptionRepository = subscriptionRepository; this.tokenHandler = tokenHandler; CredentialsInput = credentialsInput; this.subscriptionTypeRepository = subscriptionTypeRepository; }
public AuthenticationManager(IUserManagerWrapper userManager, ISignInManagerWrapper signInManager, IMapper mapper, IEmployerHandler employerHandler, ITokenHandler tokenHandler, IHttpContextAccessor httpContextAccessor, IDataProtectionProvider dataProtectionProvider, IConfiguration configuration) { _userManager = userManager ?? throw new ArgumentNullException(nameof(_userManager)); _signInManager = signInManager ?? throw new ArgumentNullException(nameof(_signInManager)); _mapper = mapper ?? throw new ArgumentNullException(nameof(_mapper)); _employerHandler = employerHandler ?? throw new ArgumentNullException(nameof(_employerHandler)); _tokenHandler = tokenHandler ?? throw new ArgumentNullException(nameof(_tokenHandler)); _httpContextAccessor = httpContextAccessor ?? throw new ArgumentNullException(nameof(_httpContextAccessor)); _dataProtectionProvider = dataProtectionProvider ?? throw new ArgumentNullException(nameof(_dataProtectionProvider)); _configuration = configuration ?? throw new ArgumentNullException(nameof(_configuration)); }
public AuthService( DataContext context, IPasswordHasher passwordHasher, ITokenHandler tokenHandler, IOptions <AppSettings> appSettings ) { _context = context; _passwordHasher = passwordHasher; _tokenHandler = tokenHandler; _appSettings = appSettings.Value; }
public AuthenticationService( IUserService userService, ITokenHandler tokenHandler, IOptions <CustomTokenOptions> tokenOptions, UserManager <AppUser> userManager, SignInManager <AppUser> signInManager, RoleManager <AppRole> roleManager ) : base(userManager, signInManager, roleManager) { this.tokenHandler = tokenHandler; this.userService = userService; this.tokenOptions = tokenOptions.Value; }
public IdentityService(UserManager <ApplicationUser> userManager, RoleManager <ApplicationRole> roleManger, IHasher hasher, ITokenHandler tokenHandler, IMessagerService messager, IStringLocalizer <SharedResources> localizer, IUnitOfWork unitOfWork, IUserDetectionService userDetectionService, IMapper mapper, IHostEnvironment _environment, ILogger <IdentityService> logger) { this.userManager = userManager; this.roleManger = roleManger; this.hasher = hasher; this.tokenHandler = tokenHandler; this.messager = messager; this.localizer = localizer; this.unitOfWork = unitOfWork; this.userDetectionService = userDetectionService; this.mapper = mapper; this.environment = _environment; this.logger = logger; }
public UserTestsWindowViewModel(IRegionManager regionManager, ITokenHandler tokenHandler) : base(regionManager) { AllUsersFilter = ""; TestFilter = ""; AllowedUsersFilter = ""; AllowedUsers = new ObservableCollection <string>(); _tokenHandler = tokenHandler; DeleteTestButtonCommand = new DelegateCommand <object>(async(object test) => await DeleteTestButton(test)); UpdateAllowedUsersButtonCommand = new DelegateCommand(async() => await UpdateAllowedUsersButton()); AddAllowedUsersButtonCommand = new DelegateCommand <object>(async(object test) => await AddAllowedUsersButton(test)); DeleteAllowedUsersButtonCommand = new DelegateCommand <object>(async(object test) => await DeleteAllowedUsersButton(test)); EditTestButtonCommand = new DelegateCommand <object>(EditTestButton); ShowUsersResultsButtonCommand = new DelegateCommand <object>(ShowUsersResultsButton); ReturnButtonCommand = new DelegateCommand(ReturnButton); }
public bool IsValid(string token) { if (!_tokenHandlers.Any()) { return(false); } var currentToken = _tokenHandlers.Peek(); if (currentToken == null || !currentToken.IsValid(token)) { return(false); } _tokenHandler = _tokenHandlers.Dequeue(); return(true); }
public EmailHandler(IConfiguration config, IResourcesHelper resourcesHelper, ITokenHandler tokenHandler) { _configuration = config; _resourcesHelper = resourcesHelper; _tokenHandler = tokenHandler; hostEmail = _configuration["AppSettings:HostEmail"]; portEmail = _configuration["AppSettings:PortEmail"]; userNameEmail = _configuration["AppSettings:UsernameEmail"]; passwordEmail = _configuration["AppSettings:PasswordEmail"]; noReplyEmail = _configuration["AppSettings:NoReplayEmail"]; smtpClient = new SmtpClient(this.hostEmail, Convert.ToInt32(this.portEmail)) { Credentials = new NetworkCredential(this.userNameEmail, this.passwordEmail), EnableSsl = true, }; }
public EditTestWindowViewModel(IRegionManager regionManager, ITokenHandler tokenHandler) : base(regionManager) { _tokenHandler = tokenHandler; AddQuestionButtonCommand = new DelegateCommand(AddQuestionButton); AddAnswerButtonCommand = new DelegateCommand <object>(AddAnswerButton); RemoveQuestionButtonCommand = new DelegateCommand <object>(RemoveQuestionButton); RemoveAnswerButtonCommand = new DelegateCommand <object>(RemoveAnswerButton); ReturnButtonCommand = new DelegateCommand(ReturnButton); RemoveAnswerEnterButtonCommand = new DelegateCommand <object>(RemoveAnswerEnterButton); CreateTestButtonCommand = new DelegateCommand(async() => await CreateTestButton()); Test = new Test(LocalizationService.GetLocalizedValue <string>("NewTest"), StaticProperties.CurrentUserResponseHeader.Username, 0, new ObservableCollection <TestQuestion>()); NumbersOfAttempts = new ObservableCollection <int>(); for (int i = 1; i < 6; i++) { NumbersOfAttempts.Add(i); } Test.Questions.Add(new TestQuestion(LocalizationService.GetLocalizedValue <string>("Question"), new ObservableCollection <TestAnswer>())); IsTestEditing = true; }
public override Task <ProviderCultureResult> DetermineProviderCultureResult(HttpContext httpContext) { if (httpContext == null) { throw new ArgumentNullException(nameof(httpContext)); } _tokenHandler = GetService <ITokenHandler>(httpContext); //? haven't better way? _logger = GetService <ILogger <UserPreferenceRequestCultureProvider> >(httpContext); //? haven't better way? _logger.LogInformation("init searching language preference"); var headers = httpContext.Request.GetTypedHeaders().Headers[HeaderName].AsEnumerable()?.ToList(); if (headers == null || headers.Count == 0 || !headers[0].Contains(TokenType, StringComparison.InvariantCultureIgnoreCase)) { _logger.LogInformation("no authorization: stop searching language preference"); return(NullProviderCultureResult); } var accessToken = headers[0].Replace(TokenType, "").Trim(); var claims = _tokenHandler.GetClaimsFromToken(accessToken); if (claims.IsNullOrEmpty()) { _logger.LogWarning("claims not found"); return(NullProviderCultureResult); } var cultureName = claims.FirstOrDefault(c => c.Type == UserPreferenceParamName)?.Value; if (cultureName.IsNullOrWhiteSpace()) { _logger.LogInformation("claims haven't language preference"); return(NullProviderCultureResult); } _logger.LogInformation($"language preference found: {cultureName}"); return(Task.FromResult(new ProviderCultureResult(cultureName))); }
public TokenAuthenticationHandler( IOptionsMonitor <TokenAuthenticationHandlerSchemeOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock, IAuthenticationProviderApi authenticationProviderApi, IWebAppDomainFacade domainFacade, ITokenHandler tokenProvider, IConfiguration configuration) : base(options, logger, encoder, clock) { AuthenticationProviderApi = authenticationProviderApi; DomainFacade = domainFacade; TokenProvider = tokenProvider; var tokenAuthSettings = configuration.GetSection("TokenAuthSettings"); CookieName = Options != null && !string.IsNullOrWhiteSpace(Options.CookieName) ? Options.CookieName : tokenAuthSettings.GetValue <string>("CookieName"); LogoutUrl = Options != null && !string.IsNullOrWhiteSpace(Options.LogoutUrl) ? Options.LogoutUrl : tokenAuthSettings.GetValue <string>("LogoutUrl"); EnableTestUserLogin = Options != null && Options.EnableTestUserLogin is bool enableTestUserLogin ? enableTestUserLogin : tokenAuthSettings.GetValue <bool>("EnableTestUserLogin"); }
public AuthenticationService( UserManager <User> userManager, ITokenHandler tokenHandler, IOptions <JwtConfiguration> jwtConfig, IProfileManager profileManager, ApplicationDbContext context, IUrlHelper url, IEmailSender emailSender, ILogger <AuthenticationService> logger, IMapper mapper ) { _userManager = userManager; _tokenHandler = tokenHandler; _profileManager = profileManager; _jwtConfig = jwtConfig.Value; _context = context; _sessionContext = _context.Sessions; _url = url; _emailSender = emailSender; _mapper = mapper; _logger = logger; }
public AccountController( ILogger<AccountController> logger, IStringLocalizer<AccountController> localizer, UserManager<UserAccount> userManager, SignInManager<UserAccount> signInManager, ITokenHandler tokenHandler, IConfiguration configuration, IAsyncRepository<UserProfile> profileRep, IAccountService accountService) { _logger = logger; _localizer = localizer; _userManager = userManager; _signInManager = signInManager; _tokenHandler = tokenHandler; _configuration = configuration; _profileRep = profileRep; _accountService = accountService; //? this.userManager.UserValidators.Add(...) - how add to global? }
public EpisodesController(ITokenHandler tokenStore) : base(tokenStore) { _episodes = new Episodes(); }
public AuthenticationService(IUserService userService, IPasswordHasher passwordHasher, ITokenHandler tokenHandler) { _tokenHandler = tokenHandler; _passwordHasher = passwordHasher; _userService = userService; }
public WizdomClient(ITokenHandler tokenHandler, int licenseId = 0) { _wizdomLicenseId = licenseId; _tokenHandler = tokenHandler; }
public CustomersController(ITokenHandler tokenStore) : base(tokenStore) { _table = new Customers(); ViewBag.Table = _table; }
public AccountController(ITokenHandler tokenStore) : base(tokenStore) { _users = new Users(); // this._tokenStore = tokenStore; }
public FlagReport(ITokenHandler token) { UsageDescription = token.ToUsageDescription(); Description = token.Description; }
public MachineKeyCompatibilityDataFormat(ITokenHandler iTokenHandler) : base(iTokenHandler) { }
public ShopifyController(ITokenHandler tokenStore):base(tokenStore) { _orders = new Orders(); _customers = new Customers(); }
public ProductionsController(ITokenHandler tokenStore) : base(tokenStore) { _table = new Productions(); ViewBag.Table = _table; }
public RolesController(ITokenHandler tokenStore) : base(tokenStore) { _table = new Roles(); ViewBag.Table = _table; }
public ProductionsController(ITokenHandler tokenStore):base(tokenStore) { _productions = new Productions(); }
public PostsController(ITokenHandler tokenStore) : base(tokenStore) { _table = new Posts(); ViewBag.Table = _table; }
public EpisodesController(ITokenHandler tokenStore):base(tokenStore) { _episodes = new Episodes(); }
public TokenHandlerTests() { SetupMocks(); _tokenHandler = new TokenHandler(_tokenOptions.Object, _signingConfigurations, _passwordHasher.Object); }
public VidpubController(ITokenHandler tokenStore) : base(tokenStore) { }
public AnnualController(ITokenHandler tokenStore):base(tokenStore) { }
public AuthenticationControllerTests() { _mockTokenHandler = Substitute.For <ITokenHandler>();; _mockMediator = Substitute.For <IMediator>(); }
public AnnualController(ITokenHandler tokenStore) : base(tokenStore) { }
public ApplicationController() { Logger = new NLogger(); TokenStore = new FormsAuthTokenStore(); }
public AuthenticationService(IAccountService accountService, IPasswordHandler passwordHandler, ITokenHandler tokenHandler) { _tokenHandler = tokenHandler; _passwordHandler = passwordHandler; _accountService = accountService; }
public ShopifyController(ITokenHandler tokenStore, ILogger logger) : base(tokenStore,logger) { _orders = new Orders(); }
public JournalController(DataContext context, ITokenHandler <JwtSecurityToken> jwtHandler) { _context = context; _jwtHandler = jwtHandler; }
public AuthenticationService(IUserService userService, ITokenHandler tokenHandler, IHttpContextAccessor httpContextAccessor) { this._tokenHandler = tokenHandler; this._userService = userService; this._httpContextAccessor = httpContextAccessor; }
public DetailsController(ITokenHandler tokenStore) : base(tokenStore) { }
public UserService(IUserDataAccess userDataAccess, ITokenHandler tokenHandler) { _userDataAccess = userDataAccess; _tokenHandler = tokenHandler; }
public CustomersV2Controller(ITokenHandler tokenStore) : base(tokenStore) { _table = new UserModel(); ViewBag.Table = _table; }
public AuctionHouseService(HttpClient httpClient, ITokenHandler tokenHandler, string apiUrl) { _apiUrl = apiUrl; _httpClient = httpClient; _tokenHandler = tokenHandler; }
public AccountController(ITokenHandler tokenStore, IMembershipService membershipService, ISendMail sendMail) { _tokenStore = tokenStore; _membershipService = membershipService; _sendMail = sendMail; }
public LoginService(IUserService userService, IPasswordHasher passwordHasher, ITokenHandler tokenHandler) { _tokenHandler = tokenHandler; _passwordHasher = passwordHasher; _userService = userService; }
public SearchController(ITokenHandler tokenStore) : base(tokenStore) { }
// ]NOCPP] /** * The constructor. * * @param tokenHandler * the handler for receiving tokens */ public Tokenizer(ITokenHandler tokenHandler) { this.TokenHandler = tokenHandler; // [NOCPP[ this.newAttributesEachTime = false; // ]NOCPP] this.bmpChar = new char[1]; this.astralChar = new char[2]; this.tagName = null; this.attributeName = null; this.doctypeName = null; this.publicIdentifier = null; this.systemIdentifier = null; this.attributes = null; }
public AdminController(ITokenHandler tokenStore) : base(tokenStore) { }
public AuthenticationService(IUserService userService, ITokenHandler tokenHandler) { this.userService = userService; this.tokenHandler = tokenHandler; }
public ApplicationController(ITokenHandler tokenStore) : this(tokenStore, new NLogger("ApplicationController")) { }
public AuthenticationService(IUserService userService, ITokenHandler tokenHandler) { _userService = userService; _tokenHandler = tokenHandler; }
public LogsController(ITokenHandler tokenStore) : base(tokenStore) { _table = new Log(); ViewBag.Table = _table; }
public PublicController(ITokenHandler tokenStore) : base(tokenStore) { }
public Tokenizer(ITokenHandler tokenHandler, bool newAttributesEachTime) { this.TokenHandler = tokenHandler; this.newAttributesEachTime = newAttributesEachTime; this.bmpChar = new char[1]; this.astralChar = new char[2]; this.tagName = null; this.attributeName = null; this.doctypeName = null; this.publicIdentifier = null; this.systemIdentifier = null; this.attributes = null; }
public AccountController(ITokenHandler tokenStore) : base(tokenStore) { //_users = new Users(); }
public ResultsController(ITokenHandler tokenStore) : base(tokenStore) { }