Beispiel #1
0
 public ExceptionMiddleware(RequestDelegate next, IConfiguration configuration, IAuthHelper authHelper, ILogger <ExceptionMiddleware> logger)
 {
     this.Next          = next;
     this.Configuration = configuration;
     this.AuthHelper    = authHelper;
     this.Logger        = logger;
 }
Beispiel #2
0
        //private readonly int userID;
        public DictionaryService(IDictionaryRepo <DictionaryTree> DictionaryRepo, IAuthHelper auth)
        {
            //_logger = logger;
            _DictionaryRepo = DictionaryRepo;

            //userID = auth.GetUserId();
        }
Beispiel #3
0
        public OrgController(IOrgService orgService, IAuthHelper authHelper)

        {
            _orgService = orgService;
            _authHelper = authHelper;
            _userId     = _authHelper.GetUserId();
        }
 public UserDashboardModel(IOrderQuery orderQuery, IAuthHelper authHelper, IOrderApplication orderApplication, IAccountApplication accountApplication)
 {
     _orderQuery         = orderQuery;
     _authHelper         = authHelper;
     _orderApplication   = orderApplication;
     _accountApplication = accountApplication;
 }
Beispiel #5
0
 public ArmManager(IAuthHelper authHelper, IAzureClient client, ISettings settings)
 {
     _authHelper = authHelper;
     _client     = client;
     _settings   = settings;
     Task.Run(async() => await SelectTenantAsync(_settings.CurrentSubscription)).Wait();
 }
        public CloudServiceClientBase(
            ILogger logger,
            IHttpClientFactory clientFactory,
            IHttpPlatformHelperService http_helper,
            IToast toast,
            IAuthHelper authHelper,
            ICloudServiceSettings settings,
            IModelValidator validator) : base(logger, http_helper, clientFactory)
        {
            this.authHelper = authHelper;
            this.toast      = toast;
            this.settings   = settings;
            ApiBaseUrl      = string.IsNullOrWhiteSpace(settings.ApiBaseUrl)
                ? throw new ArgumentNullException(nameof(ApiBaseUrl)) : settings.ApiBaseUrl;
            connection = new ApiConnection(logger, this, http_helper, validator);

            #region SetClients

            Account       = new AccountClient(connection);
            Manage        = new ManageClient(connection);
            AuthMessage   = new AuthMessageClient(connection);
            Version       = new VersionClient(connection);
            ActiveUser    = new ActiveUserClient(connection);
            Accelerate    = new AccelerateClient(connection);
            Script        = new ScriptClient(connection);
            DonateRanking = new DonateRankingClient(connection);

            #endregion
        }
 public ConstructionPlanService(IConstructionPlanRepo <ConstructionPlan> repo, IAuthHelper authhelper, IServiceDiscoveryProvider consulclient)
 {
     _repo         = repo;
     _authhelper   = authhelper;
     _userID       = _authhelper.GetUserId();
     _consulclient = consulclient;
 }
Beispiel #8
0
 public ArmManager(IAuthHelper authHelper, IAzureClient client, ISettings settings)
 {
     _authHelper = authHelper;
     _client     = client;
     _settings   = settings;
     SelectTenantAsync(_settings.CurrentSubscription);
 }
Beispiel #9
0
 public AuthenticationService(
     IAuthHelper authHelper,
     IRestClientService restClientService)
 {
     _authHelper        = authHelper;
     _restClientService = restClientService;
 }
Beispiel #10
0
 public static void RegisterSDKServices(
     IAuthHelper authHelper,
     ILoggingService loggingService,
     IApplicationInformationService appInfoService,
     IEncryptionService encryptionService)
 {
 }
Beispiel #11
0
 public AccountController()
 {
     _userService = IoCFactory.UnityContainer.Resolve<IUserService>();
     _groupService = IoCFactory.UnityContainer.Resolve<IGroupService>();
     _messageService = IoCFactory.UnityContainer.Resolve<IMessageService>();
     _authHelper = IoCFactory.UnityContainer.Resolve<IAuthHelper>();
 }
Beispiel #12
0
 public HistoryController(/*IUserService userService, IMapper mapper, IUriService uriService, */ IAuthHelper authHelper, DatabaseContext context)
 {/*
   * _userService = userService;
   * _mapper = mapper;
   * _uriService = uriService;*/
     _authHelper = authHelper;
     _context    = context;
 }
Beispiel #13
0
 public OrderApplication(ISmsService smsService, IAuthHelper authHelper, IConfiguration configuration, IOrderRepository orderRepository, IShopInventoryACL shopInventoryACL)
 {
     _smsService       = smsService;
     _authHelper       = authHelper;
     _configuration    = configuration;
     _orderRepository  = orderRepository;
     _shopInventoryACL = shopInventoryACL;
 }
Beispiel #14
0
 private ARMClient(string apiVersion, IAuthHelper authHelper = null,
                   AzureEnvironments azureEnvironment        = AzureEnvironments.Prod, string url = null)
 {
     this._apiVersion       = apiVersion;
     this._authHelper       = authHelper ?? new AuthHelper(azureEnvironment);
     this._azureEnvironment = azureEnvironment;
     this._url = url ?? Constants.CSMUrls[(int)azureEnvironment];
 }
 public BlockController(IBlockingService blockingService, IAuthHelper authHelper, IFollowingMockRepository followingMockRepository, IMapper mapper, ILogger logger)
 {
     this.blockingService1         = blockingService;
     this.authHelper1              = authHelper;
     this.followingMockRepository1 = followingMockRepository;
     this.mapper = mapper;
     this.logger = logger;
 }
Beispiel #16
0
 public ContactService(IContactRepository contactRepository, IMapper mapper, IAuthHelper authHelper, IPhoneNumberRepository phoneNumberRepository, IUserRepository userRepository)
 {
     _phoneNumberRepository = phoneNumberRepository;
     _contactRepository     = contactRepository;
     _userRepository        = userRepository;
     _authHelper            = authHelper;
     _mapper = mapper;
 }
 public UserController(IUserService userService, IMapper mapper, IUriService uriService, IAuthHelper authHelper, DatabaseContext context /**/)
 {
     _userService = userService;
     _mapper      = mapper;
     _uriService  = uriService;
     _authHelper  = authHelper;
     _context     = context;//
 }
Beispiel #18
0
 public OrderApplication(IOrderRepository orderRepository, IAuthHelper authHelper,
                         IConfiguration configuration, IShopInventoryAcl shopInventoryAcl)
 {
     _orderRepository  = orderRepository;
     _authHelper       = authHelper;
     _configuration    = configuration;
     _shopInventoryAcl = shopInventoryAcl;
 }
Beispiel #19
0
 private ARMLib(string apiVersion, AzureEnvironments azureEnvironment, string url)
 {
     this._apiVersion       = apiVersion;
     this._authHelper       = new AuthHelper();
     this._azureEnvironment = azureEnvironment;
     this._url   = url ?? Constants.CSMUrls[(int)azureEnvironment];
     this._query = string.Empty;
 }
Beispiel #20
0
 public UserService(IAuthHelper authenticationService, UserAuthValidator userAuthValidator, IHelper helper, IUserContext <UserDTO> userContext, UserValidator userValidator)
 {
     _authenticationService = authenticationService;
     _userAuthValidator     = userAuthValidator;
     _helper        = helper;
     _userContext   = userContext;
     _userValidator = userValidator;
 }
Beispiel #21
0
 public RoomService(IRoomRepository roomRepository,
                    IMapper mapper, IAuthHelper authHelper, IUserRoomRepository userRoomRepository)
 {
     _mapper             = mapper;
     _roomRepository     = roomRepository;
     _authHelper         = authHelper;
     _userRoomRepository = userRoomRepository;
 }
Beispiel #22
0
 public AccountApplication(IAccountRepository accountRepository,
                           IPasswordHasher passwordHasher, IFileUploader fileUploader, IAuthHelper authHelper)
 {
     _accountRepository = accountRepository;
     _passwordHasher    = passwordHasher;
     _fileUploader      = fileUploader;
     _authHelper        = authHelper;
 }
Beispiel #23
0
        public ActionGroupService(IActionGroupRepo <ActionGroup> actionGroupRepo,
                                  IActionRepo <ActionInfo> _actionRepo, IAuthHelper auth)
        {
            //_logger = logger;
            _ActionGroupRepo = actionGroupRepo;
            _ActionRepo      = _actionRepo;

            userID = auth.GetUserId();
        }
Beispiel #24
0
        //private readonly IRoleRepository _roleRepository;

        public AccountApplication(IAccountRepository accountRepository, IPasswordHasher passwordHasher,
                                  IFileUploader fileUploader, IAuthHelper authHelper /*, IRoleRepository roleRepository*/)
        {
            _accountRepository = accountRepository;
            _passwordHasher    = passwordHasher;
            _fileUploader      = fileUploader;
            _authHelper        = authHelper;
            //_roleRepository = roleRepository;
        }
Beispiel #25
0
 public ImportExcelConfigService(IImportExcelConfigRepo <ImportExcelConfig> importExcelConfigRepo,
                                 IAuthHelper auth, IDistributedCache cache, IConfiguration configuration)
 {
     //_logger = logger;
     _importExcelConfigRepo = importExcelConfigRepo;
     _cache         = cache;
     _configuration = configuration;
     _userID        = auth.GetUserId();
 }
 public RestClientService(
     IAuthHelper authHelper,
     IRestClient restClient,
     IJsonSerializer jsonSerializer)
 {
     _authHelper     = authHelper;
     _restClient     = restClient;
     _jsonSerializer = jsonSerializer;
 }
Beispiel #27
0
        public ActionService(IActionRepo <ActionInfo> actionRepo, IAuthHelper auth, IDistributedCache cache)
        {
            //_logger = logger;
            _ActionRepo = actionRepo;

            userID = auth.GetUserId();

            _cache = cache;
        }
Beispiel #28
0
 public UserManager(IUserDal userDal, IMapper mapper, IAuthHelper authHelper, IHttpContextAccessor httpContextAccessor, ILikeDal likeDal, IUserRoleDal userRoleDal)
 {
     this.userRoleDal         = userRoleDal;
     this.likeDal             = likeDal;
     this.httpContextAccessor = httpContextAccessor;
     this.authHelper          = authHelper;
     this.mapper  = mapper;
     this.userDal = userDal;
 }
Beispiel #29
0
 public UserApplication(IAuthHelper authHelper, IEmailService emailService, IPasswordHasher passwordHasher, IUserRepository userRepository, IRoleApplication roleApplication, IUserRoleApplication userRoleApplication)
 {
     _authHelper          = authHelper;
     _emailService        = emailService;
     _passwordHasher      = passwordHasher;
     _userRepository      = userRepository;
     _roleApplication     = roleApplication;
     _userRoleApplication = userRoleApplication;
 }
Beispiel #30
0
 public UserService(IUserRepo <User> userRepo, IActionRepo <ActionInfo> actionRepo,
                    IAuthHelper auth, IDistributedCache cache)
 {
     //_logger = logger;
     _repo       = userRepo;
     _ActionRepo = actionRepo;
     userID      = auth.GetUserId();
     userID      = 1;//TODO 上线删掉
     _cache      = cache;
 }
Beispiel #31
0
 public MaintenanceService(IMaintenanceRepo <MaintenanceItem> repo,
                           IConstructionPlanMonthDetailRepo <ConstructionPlanMonthDetail> detailRepo,
                           IConstructionPlanImportRepo <ConstructionPlanYear> importRepo, IAuthHelper authhelper)
 {
     _repo       = repo;
     _importRepo = importRepo;
     _detailRepo = detailRepo;
     _authhelper = authhelper;
     _userID     = _authhelper.GetUserId();
 }
Beispiel #32
0
        protected void Page_Load(object sender, EventArgs e)
        {
            AuthHelper = new MVCAuthHelper();
            Session["sdfsdf"] = "sdfsdf";
            Console.WriteLine(Session["sdfsdf"]);
            if (AuthHelper.HasAccessToken(Request))
            {
                AuthHelper.Authentication(Request.QueryString["AK"]);
                LoginName = ((MVCAuthHelper)AuthHelper).UserData.userPrincipleName;
                BuddyLink = "Sign Out";
                SignoutServer = ConfigurationManager.AppSettings["SignoutServer"];
                return;
            }

            if(!string.IsNullOrEmpty(Request.QueryString["BK"]))
            {
                AuthHelper.ClearCookieAndLogoff();
                BuddyLink = "Register";
                SignoutServer = "Account/Register";
                LoginName = "Log In";
                return;
            }

            //if (!AuthHelper.IsAuthentication() || !string.IsNullOrEmpty(Request.QueryString["BK"]))
            else if (!AuthHelper.IsAuthentication())
            {
                BuddyLink = "Register";
                SignoutServer = "Account/Register";
                LoginName = "Log In";
            }
            else
            {
                LoginName = ((MVCAuthHelper)AuthHelper).UserData.userPrincipleName;
                BuddyLink = "Sign Out";
                SignoutServer = ConfigurationManager.AppSettings["SignoutServer"];
            }

            //if (AuthHelper.IsAuthentication() && !AuthHelper.IsAuthorization())
            if (!AuthHelper.IsAuthorization())
            {
                AuthHelper.Authorization("05dbf7ce-ea6b-4784-89c6-d11c67a2c7f1", "CATITA ClientWepApp", DateTime.Now.Ticks.ToString());
            }

        }