protected RequestContext CreateRequestContextAndLogVersionInfo()
        {
            var requestContext = new RequestContext(
                _clientApplicationBase.AppConfig.ClientId,
                AuthLogger.Create(ServiceBundle.Config));

            var logValue = $"AUTH '{ServiceBundle.PlatformProxy.GetProductName()}', file version '{AssemblyUtils.GetAssemblyFileVersionAttribute()}', informational version '{AssemblyUtils.GetAssemblyInformationalVersion()}'";

            requestContext.Logger.Info(logValue);

            return(requestContext);
        }
Ejemplo n.º 2
0
        internal ServiceBundle(
            ApplicationConfiguration config)
        {
            Config = config;

            DefaultLogger = new AuthLogger(
                config.LogLevel,
                config.EnablePiiLogging,
                config.IsDefaultPlatformLoggingEnabled,
                config.LoggingCallback);

            PlatformProxy = PlatformProxyFactory.CreatePlatformProxy(DefaultLogger);
            HttpManager   = config.HttpManager ?? new HttpManager(config.HttpClientFactory);
        }
Ejemplo n.º 3
0
 public ThirdPartyController(
     IEnumerable <IAuthProvider> authProviders,
     GatewayDbContext dbContext,
     UserAppAuthManager authManager,
     DeveloperApiService apiService,
     UserManager <GatewayUser> userManager,
     SignInManager <GatewayUser> signInManager,
     AuthLogger authLogger)
 {
     _authProviders = authProviders;
     _dbContext     = dbContext;
     _authManager   = authManager;
     _apiService    = apiService;
     _userManager   = userManager;
     _signInManager = signInManager;
     _authLogger    = authLogger;
 }
Ejemplo n.º 4
0
 public OAuthController(
     UserManager <GatewayUser> userManager,
     SignInManager <GatewayUser> signInManager,
     ILoggerFactory loggerFactory,
     GatewayDbContext context,
     DeveloperApiService developerApiService,
     ConfirmationEmailSender emailSender,
     ISessionBasedCaptcha sessionBasedCaptcha,
     UserAppAuthManager authManager,
     AuthLogger authLogger)
 {
     _userManager   = userManager;
     _signInManager = signInManager;
     _logger        = loggerFactory.CreateLogger <OAuthController>();
     _dbContext     = context;
     _apiService    = developerApiService;
     _emailSender   = emailSender;
     _captcha       = sessionBasedCaptcha;
     _authManager   = authManager;
     _authLogger    = authLogger;
 }
Ejemplo n.º 5
0
 public OAuthController(
     UserManager <GatewayUser> userManager,
     SignInManager <GatewayUser> signInManager,
     ILoggerFactory loggerFactory,
     GatewayDbContext context,
     DeveloperApiService developerApiService,
     ISessionBasedCaptcha sessionBasedCaptcha,
     UserAppAuthManager authManager,
     AuthLogger authLogger,
     IConfiguration configuration,
     CannonService cannonService)
 {
     _userManager         = userManager;
     _signInManager       = signInManager;
     _logger              = loggerFactory.CreateLogger <OAuthController>();
     _dbContext           = context;
     _apiService          = developerApiService;
     _captcha             = sessionBasedCaptcha;
     _authManager         = authManager;
     _authLogger          = authLogger;
     _cannonService       = cannonService;
     _allowRegistering    = configuration["AllowSelfRegistering"].Trim().ToLower() == true.ToString().ToLower();
     _allowPasswordSignIn = configuration["AllowPasswordSignIn"].Trim().ToLower() == true.ToString().ToLower();
 }