Exemple #1
0
        public SessionsController(
            IIdentityServerInteractionService interaction,
            IClientStore clientStore,
            IAuthenticationSchemeProvider schemeProvider,
            IEventService events,
            TestUserStore users,

            ICredentialStore credentialStore,
            ISessionStore sessionStore,
            ILoginAttemptStore loginAttemptStore,
            IRequestInfoService requestInfoService,
            ILoginAttemptLimitingService loginAttemptLimitingService,
            ICredentialPenaltyStore credentialPenaltyStore)
        {
            // if the TestUserStore is not in DI, then we'll just use the global users collection
            // this is where you would plug in your own custom identity management library (e.g. ASP.NET Identity)
            _users = users;

            _interaction    = interaction;
            _clientStore    = clientStore;
            _schemeProvider = schemeProvider;
            _events         = events;

            this.CredentialStore             = credentialStore;
            this.SessionStore                = sessionStore;
            this.LoginAttemptStore           = loginAttemptStore;
            this.RequestInfoService          = requestInfoService;
            this.LoginAttemptLimitingService = loginAttemptLimitingService;
            this.CredentialPenaltyStore      = credentialPenaltyStore;
        }
Exemple #2
0
        public RequestInfo(IAppInfoService app,
                           IRequestInfoService req,
                           IEnumerable <IEvent> eventList)
        {
            this.MachineName = app.MachineName;
            this.AppName     = app.AppName;
            this.AppVersion  = app.AppVersion;
            this.Environment = app.AppEnvironment;

            this.Url         = req.Url;
            this.QueryString = req.QueryString;
            this.RequestBody = req.RequestBody;
            this.Verb        = req.Verb;

            this.AcceptLanguage          = req.AcceptLanguageHeader;
            this.RequestTraceIdentitfier = req.RequestId;

            this.Datetime  = req.StartDateUtc;
            this.IdProcess = req.IdProcess;

            this.LocalIpAddress  = app.LocalIp;
            this.RemoteIpAddress = req.RemoteIp;
            this.Events          = eventList;

            this.Level = "UNDEFINED";

            if (this.Events != null && this.Events.Count() > 0)
            {
                _highestLogLevel = this.Events.Max(x => x.GetLogLevel());
                this.Level       = _highestLogLevel.ToString();
            }
        }
Exemple #3
0
        public Loxy(IHttpContextAccessor httpContext,
                    IAppInfoService appInfoService,
                    IRequestInfoService reqInfoService,
                    LoxyBuilder loxyBuilder)
        {
            if (httpContext == null)
            {
                throw new ArgumentNullException(nameof(httpContext));
            }
            if (appInfoService == null)
            {
                throw new ArgumentNullException(nameof(appInfoService));
            }
            if (reqInfoService == null)
            {
                throw new ArgumentNullException(nameof(reqInfoService));
            }
            if (loxyBuilder == null)
            {
                throw new ArgumentNullException(nameof(loxyBuilder));
            }

            EventHistory           = new List <IEvent>();
            HttpContext            = httpContext.HttpContext;
            ApplicationInfoService = appInfoService;
            RequestInfoService     = reqInfoService;
            Sinks = loxyBuilder.Sinks.Sinks;
        }
Exemple #4
0
 public CustomerImportController(IRequestInfoService info,
                                 ICustomerImportApplication customerImportApp,
                                 ICustomerImportResetPasswordTokenApplication resetPasswordTokenApp)
     : base(info)
 {
     this.customerImportApp     = customerImportApp;
     this.resetPasswordTokenApp = resetPasswordTokenApp;
 }
Exemple #5
0
 public PublicCollectionsController(
     ApplicationDbContext dbContext,
     IRequestInfoService requestInfoService,
     IUserContextProvider userContextProvider,
     IMemoryCache cache)
 {
     _dbContext           = dbContext;
     _requestInfoService  = requestInfoService;
     _userContextProvider = userContextProvider;
     _cache = cache;
 }
Exemple #6
0
 public AccountController(
     IRequestInfoService info,
     IStoreApplication storeApp,
     IApplicationStoreApplication appStoreApp,
     ITransferTokenApplication transferTokenApp,
     IAccountResetPasswordTokenApplication resetPasswordTokenApp,
     IResetSMSTokenApplication resetSMSTokenApplication,
     IAccountApplication accountApp)
     : base(info)
 {
     this.accountApp               = accountApp;
     this.storeApp                 = storeApp;
     this.appStoreApp              = appStoreApp;
     this.transferTokenApp         = transferTokenApp;
     this.resetPasswordTokenApp    = resetPasswordTokenApp;
     this.resetSMSTokenApplication = resetSMSTokenApplication;
 }
Exemple #7
0
 public ResourcesController(IRequestInfoService info, IResourceApplication resourceApp)
     : base(info)
     => this.resourceApp = resourceApp;
Exemple #8
0
 public ApplicationStoreController(IRequestInfoService info, IStoreApplication storeApp, IApplicationStoreApplication appStore)
     : base(info)
 {
     this.storeApp = storeApp;
     this.appStore = appStore;
 }
Exemple #9
0
 public BaseApiController(IRequestInfoService info)
 => this.info = info;
 public ReviewsController(IItemService itemService, IReviewService reviewService, IRequestInfoService requestInfoService)
 {
     _requestInfoService = requestInfoService;
     _reviewService      = reviewService;
     _itemService        = itemService;
 }
Exemple #11
0
 public RestrictionsController(IRequestInfoService info, IRestrictionApplication restrictionApplication)
     : base(info)
     => this.restrictionApplication = restrictionApplication;
Exemple #12
0
 public StoreAccountController(IRequestInfoService info, IStoreAccountApplication storeAccountApp)
     : base(info)
     => this.storeAccountApp = storeAccountApp;
Exemple #13
0
 public PermissionsController(IRequestInfoService info, IPermissionApplication permissionApp)
     : base(info)
     => this.permissionApp = permissionApp;
Exemple #14
0
 public MetadataController(IRequestInfoService info, IMetadataApplication metadataApp)
     : base(info)
     => this.metadataApp = metadataApp;
Exemple #15
0
 public CreditCardController(IRequestInfoService info, ICreditCardApplication creditCardApp)
     : base(info)
     => this.creditCardApp = creditCardApp;
Exemple #16
0
 public AutofacTestController(IRequestInfoService info) : base(info)
 {
 }
Exemple #17
0
 public BlackListController(IRequestInfoService info, IBlacklistApplication blacklistApp)
     : base(info)
     => this.blacklistApp = blacklistApp;
Exemple #18
0
 public AuthAdminController(IRequestInfoService info, IAccountApplication accountApplication)
     : base(info)
     => this.accountApplication = accountApplication;
Exemple #19
0
 public RolesController(IRequestInfoService info, IRoleApplication roleApp)
     : base(info)
     => this.roleApp = roleApp;
Exemple #20
0
 public HomeController(IAppInfoService appInfoService, IRequestInfoService reqInfoService)
 {
     this.AppInfoService     = appInfoService;
     this.RequestInfoService = reqInfoService;
 }
Exemple #21
0
 public AccountAddressController(IRequestInfoService info, IAccountApplication accountApp)
     : base(info)
     => this.accountApp = accountApp;
Exemple #22
0
 public ApplicationController(IRequestInfoService info, IApplicationApplication appAplication)
     : base(info)
     => this.appAplication = appAplication;
Exemple #23
0
 public CustomerDashboardController(IRequestInfoService info, IAccountApplication accountApplication)
     : base(info)
     => this.accountApplication = accountApplication;
Exemple #24
0
 public RequisitionController(IRequestInfoService info, IRequisitionApplication requisitionApp)
     : base(info)
     => this.requisitionApp = requisitionApp;