public SessionController( ICreyService <SessionTokenRepository> sessionTokenRepository, ICreyService <SessionRepository> sessionRepository, CreySignInManager signInManager, IIDInfoAccessor idInfo, ILogger <SessionController> logger) { sessionTokenRepository_ = sessionTokenRepository; sessionRepository_ = sessionRepository; signInManager_ = signInManager; idInfo_ = idInfo; logger_ = logger; }
public ExternalRegisterModel( SignInManager <ApplicationUser> signInManager, UserManager <ApplicationUser> userManager, ICreyService <RegistrationHandler> registrationHandler, ILogger <ExternalRegisterModel> logger, CreyMessageBroker <IAccountServiceBusMessage> accountMessageBroker) { _signInManager = signInManager; _userManager = userManager; _registrationHandler = registrationHandler; _logger = logger; _accountMessageBroker = accountMessageBroker; }
//[ServerToServer] public async Task <SessionInfo> SignInWithAccountIdAsync( int accountId, [FromServices] ICreyService <AccountRepository> db, [FromServices] SignInManager <ApplicationUser> signIn, [FromServices] IIDInfoAccessor idInfo) { var user = await db.Value.FindUserByAccountIdAsync(accountId); await signIn.SignInAsync(user, false, CredentialType.Impersonation.ToString()); // note: also session is passed in cookies, still simplify code with returning it directly // and in future seems it will be resonable somehow create `session` without setting cookies return(idInfo.GetSessionInfo()); }
public RegisterPlayerModel( SignInManager <ApplicationUser> signInManager, ILogger <RegisterPlayerModel> logger, IConfiguration configuration, ReCaptcha reCaptcha, ICreyService <RegistrationHandler> registrationHandler, CreyMessageBroker <IAccountServiceBusMessage> accountMessageBroker) { _signInManager = signInManager; _logger = logger; _reCaptcha = reCaptcha; _registrationHandler = registrationHandler; _accountMessageBroker = accountMessageBroker; ReCaptchaClientKey = configuration.GetReCaptchaSiteKey(IAMDefaults.SERVICE_NAME); }
public RegistrationHandler( UserManager <ApplicationUser> userManager, ICreyService <AccountRepository> accountRepo, ICreyService <IFeatureGate> featureGate, AnalyticsClient analyticsClient, CreyModeratorClient moderation, CreyRestClient creyRestClient, ICreyService <EmailSender> emailSender) { userManager_ = userManager; accountRepo_ = accountRepo; featureGate_ = featureGate; analyticsClient_ = analyticsClient; moderation_ = moderation; creyRestClient_ = creyRestClient; emailSender_ = emailSender; }
public SessionRepository( ILogger <SessionRepository> logger, IConfiguration configuration, ApplicationDbContext appDBContext, UserManager <ApplicationUser> userManager, ICreyService <SessionTokenRepository> sessionTokenRepository, ICreyService <AccountRepository> accountRepository, CreyRestClient creyRestClient) { logger_ = logger; configuration_ = configuration; appDBContext_ = appDBContext; userManager_ = userManager; sessionTokenRepository_ = sessionTokenRepository; creyRestClient_ = creyRestClient; accountRepository_ = accountRepository; }
public AccountRepository( ILogger <AccountRepository> logger, IConfiguration configuration, ApplicationDbContext appDBContext, UserManager <ApplicationUser> userManager, RoleManager <IdentityRole> roleManager, ICreyService <SessionTokenRepository> sessionTokenRepository, CreyRestClient creyRestClient, IIDInfoAccessor idInfo, CreyMessageBroker <IAccountServiceBusMessage> accountMessageBroker) { logger_ = logger; configuration_ = configuration; appDBContext_ = appDBContext; userManager_ = userManager; roleManager_ = roleManager; sessionTokenRepository_ = sessionTokenRepository; creyRestClient_ = creyRestClient; idInfo_ = idInfo; accountMessageBroker_ = accountMessageBroker; }
public SignatureFlowService(IConfiguration configuration, ICreyService <AccountRepository> users, CreyRestClient http) { secret_ = configuration.GetValue <string>("COOKIE-SESSIONINFO-SECRET"); users_ = users; http_ = http; }
public HealthCheckController(ICreyService <ProvidedService> providedService) { providedService_ = providedService; }
public async Task Invoke(HttpContext context, ILogger <ChaosMiddleware> logger, ICreyService <IFeatureGate> featureGate) { if (await featureGate.Value.IsChaosAsync(context.Request.Path)) { context.Response.StatusCode = (int)HttpStatusCode.TooManyRequests; await context.Response.WriteAsync("Chaos rules all"); return; } await next(context); }
public ForgotPasswordModel(UserManager <ApplicationUser> userManager, ICreyService <EmailSender> emailSender) { _userManager = userManager; _emailSender = emailSender; }
public Task SignInWithFacebookAccessTokenAsync( [FromServices] ICreyService <OAuthRepository> oAuthRepository, [FromBody] AccessTokenInput accessTokenInput) { return(oAuthRepository.Value.FacebookSignIn(accessTokenInput.AccessToken, HttpContext.RequestAborted)); }
public EmailController(ICreyService <EmailSender> emailSender) { emailSender_ = emailSender; }
public AdminController(ICreyService <AccountRepository> accountRepository) { accountRepository_ = accountRepository; }