Ejemplo n.º 1
0
 public AgentsController(IAgentRegistrationService agentRegistrationService,
                         IAgentContextService agentContextService,
                         IAgentContextInternal agentContextInternal,
                         IAgentInvitationAcceptService agentInvitationAcceptService,
                         IInvitationRecordService invitationRecordService,
                         ITokenInfoAccessor tokenInfoAccessor,
                         IAgentSettingsManager agentSettingsManager,
                         IAgentService agentService,
                         IAgentStatusManagementService agentStatusManagementService,
                         IAgentInvitationRecordListService agentInvitationRecordListService,
                         IAgentInvitationCreateService agentInvitationCreateService,
                         IIdentityUserInfoService identityUserInfoService,
                         IAgentRolesAssignmentService rolesAssignmentService)
 {
     _agentRegistrationService     = agentRegistrationService;
     _agentContextService          = agentContextService;
     _agentContextInternal         = agentContextInternal;
     _agentInvitationAcceptService = agentInvitationAcceptService;
     _invitationRecordService      = invitationRecordService;
     _tokenInfoAccessor            = tokenInfoAccessor;
     _agentSettingsManager         = agentSettingsManager;
     _agentService = agentService;
     _agentStatusManagementService     = agentStatusManagementService;
     _agentInvitationRecordListService = agentInvitationRecordListService;
     _agentInvitationCreateService     = agentInvitationCreateService;
     _identityUserInfoService          = identityUserInfoService;
     _rolesAssignmentService           = rolesAssignmentService;
 }
 public InAgencyPermissionAuthorizationHandler(IAgentContextInternal agentContextInternal,
                                               IPermissionChecker permissionChecker,
                                               ILogger <InAgencyPermissionAuthorizationHandler> logger)
 {
     _agentContextInternal = agentContextInternal;
     _permissionChecker    = permissionChecker;
     _logger = logger;
 }
Ejemplo n.º 3
0
 public MinAgencyVerificationStateAuthorizationHandler(IAgentContextInternal agentContextInternal, IDoubleFlow flow,
                                                       EdoContext context, ILogger <MinAgencyVerificationStateAuthorizationHandler> logger)
 {
     _agentContextInternal = agentContextInternal;
     _flow    = flow;
     _context = context;
     _logger  = logger;
 }
        public async Task InvokeAsync(HttpContext context, IAgentContextInternal agentContextService)
        {
            var(isSuccess, _, agentContext, _) = await agentContextService.GetAgentInfo();

            if (isSuccess)
            {
                var scopedData = new Dictionary <string, object>
                {
                    { "AgentId", agentContext.AgentId },
                    { "AgencyId", agentContext.AgencyId }
                };

                using var disposable = _logger.BeginScope(scopedData);
                await _next(context);
            }
            else
            {
                await _next(context);
            }
        }
Ejemplo n.º 5
0
 public AgentsController(IAgentRegistrationService agentRegistrationService, IAgentContextService agentContextService,
                         IAgentContextInternal agentContextInternal,
                         IAgentInvitationService agentInvitationService,
                         ITokenInfoAccessor tokenInfoAccessor,
                         IAgentSettingsManager agentSettingsManager,
                         IAgentPermissionManagementService permissionManagementService,
                         IHttpClientFactory httpClientFactory,
                         IAgentService agentService,
                         IAgentStatusManagementService agentStatusManagementService)
 {
     _agentRegistrationService    = agentRegistrationService;
     _agentContextService         = agentContextService;
     _agentContextInternal        = agentContextInternal;
     _agentInvitationService      = agentInvitationService;
     _tokenInfoAccessor           = tokenInfoAccessor;
     _agentSettingsManager        = agentSettingsManager;
     _permissionManagementService = permissionManagementService;
     _httpClientFactory           = httpClientFactory;
     _agentService = agentService;
     _agentStatusManagementService = agentStatusManagementService;
 }
 public AgentRequiredAuthorizationHandler(IAgentContextInternal agentContextInternal, ILogger <AgentRequiredAuthorizationHandler> logger)
 {
     _agentContextInternal = agentContextInternal;
     _logger = logger;
 }