Esempio n. 1
0
 public AuthController()
 {
     _authProxy                   = serviceProxyFactory.CreateProxy <IAuthAppService>();
     _serviceProxyProvider        = ServiceLocator.GetService <IServiceProxyProvider>();
     _serviceRouteProvider        = ServiceLocator.GetService <IServiceRouteProvider>();        //serviceRouteProvider;
     _authorizationServerProvider = ServiceLocator.GetService <IAuthorizationServerProvider>(); // authorizationServerProvider;
 }
        public async Task <IActionResult> RefreshAsync([FromServices] IAuthAppService authAppService, [FromForm] LoginRefresh loginRefresh)
        {
            var token = await authAppService.RefreshAsync(loginRefresh.Key, loginRefresh.UId,
                                                          Request.HttpContext.Connection.RemoteIpAddress.AddressFamily.ToString());

            return(Ok(token));
        }
Esempio n. 3
0
 public UserAppService(IMapper mapper, ICosmosToggleDataContext cosmosToggleDataContext, INotificationContext notificationContext,
                       IValidator <User> userValidator, IAuthAppService authAppService)
 {
     _mapper = mapper;
     _cosmosToggleDataContext = cosmosToggleDataContext;
     _notificationContext     = notificationContext;
     _userValidator           = userValidator;
 }
 public FlagAppService(IMapper mapper, IValidator <Flag> flagValidator, ICosmosToggleDataContext cosmosToggleDataContext,
                       INotificationContext notificationContext, IAuthAppService authAppService)
 {
     _mapper                  = mapper;
     _flagValidator           = flagValidator;
     _cosmosToggleDataContext = cosmosToggleDataContext;
     _notificationContext     = notificationContext;
     _authAppService          = authAppService;
 }
 public EnvironmentAppService(IMapper mapper, IValidator <Environment> environmentValidator,
                              ICosmosToggleDataContext cosmosToggleDataContext, INotificationContext notificationContext, IAuthAppService authAppService)
 {
     _mapper = mapper;
     _cosmosToggleDataContext = cosmosToggleDataContext;
     _environmentValidator    = environmentValidator;
     _notificationContext     = notificationContext;
     _authAppService          = authAppService;
 }
 static CacheDataManager()
 {
     RoleAppService = ContainerManager.Resolve <IRoleAppService>();
     AuthAppService = ContainerManager.Resolve <IAuthAppService>();
     AuthorizeManager.AuthorizeVerifyProcessAsync = AuthorizationManager.AuthenticationAsync;
     Timer           = new Timer(RefreshAuthInterval);
     Timer.AutoReset = true;
     Timer.Enabled   = true;
     Timer.Elapsed  += Timer_Elapsed;
     Timer.Start();
 }
Esempio n. 7
0
 public ProjectAppService(IMapper mapper, IValidator <Project> productValidator, ICosmosToggleDataContext cosmosToggleDataContext,
                          INotificationContext notificationContext, ISecurityContext securityContext, IAuthAppService authAppService, IUserAppService userAppService)
 {
     _mapper                  = mapper;
     _productValidator        = productValidator;
     _cosmosToggleDataContext = cosmosToggleDataContext;
     _notificationContext     = notificationContext;
     _securityContext         = securityContext;
     _authAppService          = authAppService;
     _userAppService          = userAppService;
 }
        public async Task <IActionResult> LoginAsync([FromServices] IAuthAppService authAppService, [FromForm] Login login)
        {
            var refreshToken = await authAppService.LoginAsync(login, Request.HttpContext.Connection.RemoteIpAddress.AddressFamily.ToString());

            return(Ok(refreshToken));
        }
Esempio n. 9
0
 public UserController(IUserAppService userAppService, IAuthAppService authAppService)
 {
     userService = userAppService;
     authService = authAppService;
 }
Esempio n. 10
0
 public async Task <Result <LoginOutput> > Login([FromBody, Required] LoginRequest loginRequest, [FromServices] IAuthAppService authAppService)
 {
     return(await authAppService.LoginAsync(loginRequest.MapTo <LoginInput>()));
 }
Esempio n. 11
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="authAppService"></param>
 public AuthController(IAuthAppService authAppService)
 {
     this.AuthAppService = authAppService;
 }
Esempio n. 12
0
 public AddressAppService(IHttpContextAccessor context, IAddressService addressService, IAuthAppService authAppService, IMapperAdapter mapperAdapter) : base(context)
 {
     _addressService = addressService;
     _mapperAdapter  = mapperAdapter;
     _authAppService = authAppService;
 }
Esempio n. 13
0
 static AuthorizationManager()
 {
     AuthAppService = ContainerManager.Container.Resolve <IAuthAppService>();
 }
 public SchedulingAppService(IHttpContextAccessor context, ISchedulingService schedulingService, IAuthAppService authAppService, IMapperAdapter mapperAdapter) : base(context)
 {
     _schedulingService = schedulingService;
     _mapperAdapter     = mapperAdapter;
     _authAppService    = authAppService;
 }
Esempio n. 15
0
 public AuthorityOperationController(IAuthAppService authAppService)
 {
     authService = authAppService;
 }
Esempio n. 16
0
 public AuthController(IHandler <DomainNotification> notifications, IAuthAppService authAppService) : base(notifications)
 {
     this._authAppService = authAppService;
 }
Esempio n. 17
0
 public SysController(IUserAppService userService, IRoleAppService roleService, IAuthAppService authService)
 {
     this.userService = userService;
     this.roleService = roleService;
     this.authService = authService;
 }
Esempio n. 18
0
 public AuthorityController(IAuthAppService authAppService)
 {
     authService = authAppService;
 }
Esempio n. 19
0
 public AuthController(ILogger <AuthController> logger, IAuthAppService service)
 {
     _logger  = logger;
     _service = service;
 }
Esempio n. 20
0
 public RoleController(IRoleAppService roleAppService, IUserAppService userAppService, IAuthAppService authAppService)
 {
     roleService = roleAppService;
     userService = userAppService;
     authService = authAppService;
 }
Esempio n. 21
0
 public AuthController(IAuthAppService authAppService, IUserAppService userAppService)
 {
     _authAppService = authAppService;
     _userAppService = userAppService;
 }
Esempio n. 22
0
 public async Task <Result <TokenInfo> > CreateToken([FromBody, Required] LoginRequest loginRequest, [FromServices] IAuthAppService authAppService)
 {
     return(await authAppService.CreateTokenAsync(loginRequest.MapTo <LoginInput>()));
 }
 public UserAuthProjectIdParamFilter(IHttpContextAccessor httpContextAccessor, IAuthAppService authAppService)
 {
     _httpContextAccessor = httpContextAccessor;
     _authAppService      = authAppService;
 }