Beispiel #1
0
        public UserService(ISSOService ssoService,
                           IRepositoryCommand <User, long> userCommandRepo,
                           IRepositoryQuery <User, long> userQueryRepo,
                           IRepositoryCommand <UserRole, long> userRoleCommandRepo,
                           IRepositoryQuery <UserRole, long> userRoleQueryRepo,
                           IRepositoryQuery <Role, long> roleQueryRepo,
                           IRepositoryQuery <Company, long> companyQueryRepo,
                           IEmailService emailService,
                           IMapper mapper,
                           IOptions <SSoSetting> sSoSetting, IHttpContextExtensionService httpContext)
        {
            _ssoSettings         = sSoSetting.Value;
            _ssoService          = ssoService;
            _userCommandRepo     = userCommandRepo;
            _userQueryRepo       = userQueryRepo;
            _userRoleCommandRepo = userRoleCommandRepo;
            _roleQueryRepo       = roleQueryRepo;
            _companyQueryRepo    = companyQueryRepo;
            _emailService        = emailService;
            _mapper            = mapper;
            _userRoleQueryRepo = userRoleQueryRepo;
            _httpContext       = httpContext;

            CurrentUserId = _httpContext.GetCurrentSSOUserId();
        }
Beispiel #2
0
 public SSOService(IHttpClientFactory clientFactory, IHttpContextAccessor httpContextAccessor, IOptions <SSoSetting> ssoConstants)
 {
     _clientFactory       = clientFactory;
     _httpContextAccessor = httpContextAccessor;
     _ssoConstants        = ssoConstants.Value;
 }