Exemple #1
0
 public CreateCustomerCommandHandler(IApplicationUserContext applicationUserContext, ICustomerFactory customerFactory, ICustomerRepository customerRepository, IMapper mapper)
 {
     _applicationUserContext = applicationUserContext;
     _customerFactory        = customerFactory;
     _customerRepository     = customerRepository;
     _mapper = mapper;
 }
 public SearchRediSAuthorizationHandler(
     IApplicationUserContext applicationUserContext,
     IAuthorizationContext <SearchRediSResponse> context)
     : base(applicationUserContext, context)
 {
     AllowAnonymous = true;
 }
Exemple #3
0
 public ExecutionPipelineContext(IApplicationUserContext applicationUserContext)
 {
     Messages   = new List <MessageDto>();
     Events     = new ArrayList();
     Aggregates = new ArrayList();
     _applicationUserContext = applicationUserContext;
 }
 public GetPortfolioAuthorizationHandler(IApplicationUserContext applicationUserContext,
                                         IAuthorizationContext <GetPortfolioResponse> context)
     : base(applicationUserContext, context)
 {
     IsLoggedIn();
     AllowAnonymous = false;
 }
 public GetListPortfolioTransactionsSummaryAuthorizationHandler(
     IApplicationUserContext applicationUserContext,
     IAuthorizationContext <GetListPortfolioTransactionsSummaryResponse> context)
     : base(applicationUserContext, context)
 {
     IsLoggedIn();
 }
 public RegisterModel(
     IApplicationUserContext applicationUserContext,
     ILogger <RegisterModel> logger)
 {
     this.applicationUserContext = applicationUserContext;
     this.logger = logger;
 }
 public CreatePasswordModel(
     IApplicationUserContext applicationUserContext,
     ILogger <CreatePasswordModel> logger)
 {
     this.applicationUserContext = applicationUserContext;
     this.logger = logger;
 }
 public GetLeadAuthorizationHandler(IApplicationUserContext applicationUserContext
                                    , IAuthorizationContext <GetLeadResponse> context)
     : base(applicationUserContext, context)
 {
     //IsLoggedIn();
     AllowAnonymous = true;
 }
 public IsLoggedOnAuthorizationHandler(IApplicationUserContext applicationUserContext,
                                       IAuthorizationContext <TOut> context, ILifetimeScope scope, ILog log)
 {
     ApplicationUserContext = applicationUserContext;
     _context = context;
     _scope   = scope;
     _log     = log;
 }
Exemple #10
0
 public CreateEntityAuditDtoAuthorizationHandler(
     IApplicationUserContext applicationUserContext,
     IAuthorizationContext <int> context)
     : base(applicationUserContext, context)
 {
     IsLoggedIn();
     AllowAnonymous = false;
 }
Exemple #11
0
 public SendEmailDtoAuthorizationHandler(
     IApplicationUserContext applicationUserContext,
     IAuthorizationContext <SendEmailResponse> context
     )
     : base(applicationUserContext, context)
 {
     IsLoggedIn();
 }
 protected override void Given()
 {
     _getLeadRequest = new GetLeadRequest()
     {
         Id = _leadId
     };
     _appUser = ApplicationContext.Container.Resolve <IApplicationUserContext>();
 }
 public CreateLeadWorkerHandler(
     IMapper mapper,
     IRepository repository,
     ILifetimeScope scope,
     IWorkerContext <int> context, IApplicationUserContext applicationUserContext
     ) : base(mapper, repository, scope, context)
 {
     _applicationUserContext = applicationUserContext;
 }
 public ApplicationUserContextAccessor(
     IApplicationUserContext context,
     Mock <IApplicationUserSignInManager> mockSignInManager,
     Mock <IApplicationUserManager> mockUserManager)
 {
     this.Context      = context;
     MockSignInManager = mockSignInManager;
     MockUserManager   = mockUserManager;
 }
Exemple #15
0
 public AuthenticationDummyFilter(IAuthenticationContext <TOut> context,
                                  ISecondaryExecutionPipeline executionPipeline,
                                  IApplicationUserContext applicationUserContext,
                                  IMapper mapper)
 {
     _context                = context;
     _executionPipeline      = executionPipeline;
     _applicationUserContext = applicationUserContext;
     _mapper = mapper;
 }
 public ApplicationContextHandler(
     IStorage storage,
     IApplicationUserContext applicationUserContext,
     IMapper mapper, ITokenCache tokenCache)
 {
     _storage = storage;
     _applicationUserContext = applicationUserContext;
     _mapper     = mapper;
     _tokenCache = tokenCache;
 }
Exemple #17
0
        public CustomLogger(IConfiguration config,
                            IApplicationUserContext applicationUserContext
                            //, TelemetryClient telemetryClient
                            )
        {
            //telemetryClient.InstrumentationKey = config["ApplicationInsightsInstrumentionKey"];

            _confg = config;
            _applicationUserContext = applicationUserContext;
            //_telemetryClient = telemetryClient;
        }
 public ValidateTokenAuthenticationHandler(IAuthenticationContext <ValidateTokenResponse> context,
                                           ISecondaryExecutionPipeline executionPipeline,
                                           IApplicationUserContext applicationUserContext,
                                           IMapper mapper,
                                           ITokenCache tokenCache)
 {
     Context                 = context;
     _executionPipeline      = executionPipeline;
     _applicationUserContext = applicationUserContext;
     _mapper                 = mapper;
     _tokenCache             = tokenCache;
 }
Exemple #19
0
 public GetTokenDtoWorkerHandler(IMapper mapper,
                                 IReadOnlyRepository repository,
                                 IApplicationUserContext applicationUserContext,
                                 IComponentContext scope,
                                 ISecondaryExecutionPipeline executionPlan,
                                 IConfiguration configuration,
                                 IWorkerContext <ApplicationUserContext> context) : base(mapper, repository, scope, context)
 {
     _applicationUserContext = applicationUserContext;
     _executionPlan          = executionPlan;
     _configuration          = configuration;
 }
        /// <summary>
        /// Set new IApplicationUserContext to storage and IOC for new login
        /// </summary>
        /// <param name="applicationUserContext"></param>
        /// <returns></returns>
        /// <exception cref="KeyNotFoundException"></exception>
        public IApplicationUserContext SetContext(IApplicationUserContext applicationUserContext)
        {
            _mapper.Map(applicationUserContext, _applicationUserContext);
            var key = _tokenCache.Get();

            if (key == null)
            {
                throw new KeyNotFoundException("user cookie key not found");
            }
            _storage.Set(key, _applicationUserContext);
            return(_applicationUserContext);
        }
Exemple #21
0
 public GetLeadWorkerHandler(IMapper mapper,
                             IApplicationUserContext applicationUserContext,
                             IReadOnlyRepository repository,
                             IWorkerContext <GetLeadResponse> context,
                             IDelegateContext redisContext,
                             ILifetimeScope scope
                             )
     : base(mapper, repository, scope, context)
 {
     _applicationUserContext = applicationUserContext;
     _redisContext           = redisContext;
 }
 public GetApplicationUserContextAuthenticationHandler(IAuthenticationContext <TOut> context,
                                                       ISecondaryExecutionPipeline executionPipeline,
                                                       IApplicationUserContext applicationUserContext,
                                                       IMapper mapper,
                                                       ITokenCache tokenCache, ILifetimeScope scope)
 {
     Context                 = context;
     _executionPipeline      = executionPipeline;
     _applicationUserContext = applicationUserContext;
     _mapper                 = mapper;
     _tokenCache             = tokenCache;
     _scope = scope;
 }
Exemple #23
0
        public GetLookupsWorkerHandler(
            IGetLookupRequestContext requestContext,
            IMapper mapper,
            IReadOnlyRepository repository,
            IComponentContext scope,
            IApplicationUserContext applicationUserContext,
            IWorkerContext <GetLookupResponse> context) : base(mapper, scope, context)

        {
            _requestContext         = requestContext;
            _repository             = repository;
            _applicationUserContext = applicationUserContext;
            _list = new List <LookupResponse>();
        }
        public EntityAuditCommandHandlerPlugin(
            IEntityAuditFactory auditFactory,
            CommandHandlerDelegates <TRequestDto, TEntity, TOut> commandHandlerDelegates,
            ILifetimeScope scope,
            IApplicationUserContext applicationUserContext,
            IConfiguration configuration
            )
        {
            _scope = scope;
            _applicationUserContext  = applicationUserContext;
            _configuration           = configuration;
            _auditFactory            = auditFactory;
            _commandHandlerDelegates = commandHandlerDelegates;

            _commandHandlerDelegates.BeforeExecute += AuditGetEntity;
            _commandHandlerDelegates.AfterExecute  += AuditExecute;
            _commandHandlerDelegates.AfterExecute  += CompleteAudit;
        }
 public SavePortfolioAuthorizationHandler(IApplicationUserContext applicationUserContext
                                          , IAuthorizationContext <int> context)
     : base(applicationUserContext, context)
 {
     IsLoggedIn();
 }
Exemple #26
0
 public EntityFrameworkReadOnlyRepository(TContext context, IApplicationUserContext applicationUserContext)
 {
     this.DbContext         = context;
     ApplicationUserContext = applicationUserContext;
 }
 public GetLeadScheduledActivityAuthorizationHandler(IApplicationUserContext applicationUserContext
                                                     , IAuthorizationContext <GetLeadScheduledActivityResponse> context)
     : base(applicationUserContext, context)
 {
     IsLoggedIn();
 }
 public LoginModel(IApplicationUserContext applicationUserContext,
                   ILogger <LoginModel> logger)
 {
     this.applicationUserContext = applicationUserContext;
     this.logger = logger;
 }
Exemple #29
0
 public CreateLeadAuthorizationHandler(IApplicationUserContext applicationUserContext
                                       , IAuthorizationContext <int> context)
     : base(applicationUserContext, context)
 {
     IsLoggedIn();
 }
 protected AbstractAuthorizationHandler(IApplicationUserContext applicationUserContext,
                                        IAuthorizationContext <TOut> context)
 {
     ApplicationUserContext = applicationUserContext;
     this.Context           = context;
 }