Exemplo n.º 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;
 }
Exemplo n.º 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;
 }
Exemplo n.º 8
0
 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;
 }
Exemplo n.º 10
0
 public CreateEntityAuditDtoAuthorizationHandler(
     IApplicationUserContext applicationUserContext,
     IAuthorizationContext <int> context)
     : base(applicationUserContext, context)
 {
     IsLoggedIn();
     AllowAnonymous = false;
 }
Exemplo n.º 11
0
 public SendEmailDtoAuthorizationHandler(
     IApplicationUserContext applicationUserContext,
     IAuthorizationContext <SendEmailResponse> context
     )
     : base(applicationUserContext, context)
 {
     IsLoggedIn();
 }
Exemplo n.º 12
0
 protected override void Given()
 {
     _getLeadRequest = new GetLeadRequest()
     {
         Id = _leadId
     };
     _appUser = ApplicationContext.Container.Resolve <IApplicationUserContext>();
 }
Exemplo n.º 13
0
 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;
 }
Exemplo n.º 15
0
 public AuthenticationDummyFilter(IAuthenticationContext <TOut> context,
                                  ISecondaryExecutionPipeline executionPipeline,
                                  IApplicationUserContext applicationUserContext,
                                  IMapper mapper)
 {
     _context                = context;
     _executionPipeline      = executionPipeline;
     _applicationUserContext = applicationUserContext;
     _mapper = mapper;
 }
Exemplo n.º 16
0
 public ApplicationContextHandler(
     IStorage storage,
     IApplicationUserContext applicationUserContext,
     IMapper mapper, ITokenCache tokenCache)
 {
     _storage = storage;
     _applicationUserContext = applicationUserContext;
     _mapper     = mapper;
     _tokenCache = tokenCache;
 }
Exemplo n.º 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;
 }
Exemplo n.º 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;
 }
Exemplo n.º 20
0
        /// <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);
        }
Exemplo n.º 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;
 }
Exemplo n.º 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();
 }
Exemplo n.º 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;
 }
Exemplo n.º 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;
 }