public AuthController(ApplicationDbContext context, UserManager <AppUser> userManager, RoleManager <AppRole> roleManager, SignInManager <AppUser> signInManager, IAuthenticationServices authenticationServices)
 {
     _context                = context;
     _userManager            = userManager;
     _signInManager          = signInManager;
     _roleManager            = roleManager;
     _authenticationServices = authenticationServices;
 }
Ejemplo n.º 2
0
 public AuthenticationController(UserManager <User> userManager, RoleManager <IdentityRole> roleManager, MainDbContext appDb, IAuthenticationServices authServices, IConfiguration configuration, IEmailSender emailSender, IAccountServices accountServices)
 {
     this.userManager     = userManager;
     this.roleManager     = roleManager;
     this.appDb           = appDb;
     this.authServices    = authServices;
     _configuration       = configuration;
     this.emailSender     = emailSender;
     this.accountServices = accountServices;
 }
        public IActionResult GetUser(Authentication authentication, [FromServices] IAuthenticationServices _authService)
        {
            try
            {
                var user = _authService.GetUser(authentication);

                return(Ok(user));
            }
            catch (Exception)
            {
                return(BadRequest());
            }
        }
Ejemplo n.º 4
0
 public UsersController(ApplicationDbContext context, UserManager <AppUser> userManager, RoleManager <AppRole> roleManager, SignInManager <AppUser> signInManager, IAuthenticationServices authenticationServices
                        , IOptions <ConfigurationParams> config, IOptions <TemplateParams> templateParams, IHostingEnvironment hostingEnvironment, IExtendedEmailSender emailSender)
 {
     _context                = context;
     _userManager            = userManager;
     _signInManager          = signInManager;
     _authenticationServices = authenticationServices;
     _config             = config;
     _templateParams     = templateParams;
     _hostingEnvironment = hostingEnvironment;
     _emailSender        = emailSender;
     _roleManager        = roleManager;
 }
Ejemplo n.º 5
0
        public LoginViewModel(INavigationService _iNavigationService,
                              IConnectivityServices _connectivityServices,
                              IAuthenticationServices _authenticationServices,
                              IUserDialogsServices _userDialogsServices,
                              IStorageServices _storageServices
                              )
        {
            this._iNavigationService      = _iNavigationService;
            this._iConnectivityServices   = _connectivityServices;
            this._iAuthenticationServices = _authenticationServices;
            this._iUserDialogsServices    = _userDialogsServices;
            this._iStorageServices        = _storageServices;

            CanSubmit            = false;
            IsAccessing          = false;
            AccessCommand        = new Command(Access);
            CheckIsLoggedCommand = new Command(CheckIsLogged);
        }
        public IActionResult SetUser(Authentication authentication, [FromServices] IAuthenticationServices _authServices)
        {
            var user = _authServices.SetUser(authentication);

            return(Ok(user));
        }
Ejemplo n.º 7
0
 public MainWindowViewModel(IAuthenticationServices authenticationServices, IEmulationSmartDetectorRunner smartDetectorRunner, NotificationService notificationService)
 {
     this.AuthenticationServices = authenticationServices;
     this.SmartDetectorRunner    = smartDetectorRunner;
     notificationService.TabSwitchedToAlertsControl += () => { this.SelectedTab = MainWindowTabItem.AlertsControl; };
 }
Ejemplo n.º 8
0
 public LoginController(IConfiguration config, IAuthenticationServices authenticationServices)
 {
     _config = config;
     _authenticationServices = authenticationServices;
 }
Ejemplo n.º 9
0
        public ResultRoleDto GetApplicationUserRoleMenu(string ticket, long idCompany, long idApplication, long idUserApplication, long idApplicationRole)
        {
            IAuthenticationServices authenticationService = (IAuthenticationServices)this.ContextSpring.GetObject(typeof(AuthenticationServices).Name);

            return(authenticationService.GetApplicationUserRoleMenu(ticket, idCompany, idApplication, idUserApplication, idApplicationRole));
        }
Ejemplo n.º 10
0
 public AuthenticationController(IAuthenticationServices authenticationServices)
 {
     _authenticationServices = authenticationServices;
 }
Ejemplo n.º 11
0
 public AccountController(IBuildingSecuritySessionStore sessionStore, IAuthenticationServices authenticationServices)
 {
     _sessionStore = sessionStore;
     _authenticationServices = authenticationServices;
 }
Ejemplo n.º 12
0
        public AllowResourcesDto GetAllowResources(string userName, string password, long idCompany, long idApplication, string ticket)
        {
            IAuthenticationServices authenticationService = (IAuthenticationServices)this.ContextSpring.GetObject(typeof(AuthenticationServices).Name);

            return(authenticationService.GetAllowResources(userName, password, idCompany, idApplication, ticket));
        }
Ejemplo n.º 13
0
 public AccountController GetAccountController(IBuildingSecuritySessionStore sessionStore = null, IAuthenticationServices authenticationServices = null)
 {
     return new AccountController(sessionStore ?? _sessionStore, authenticationServices ?? new Mock<IAuthenticationServices>().Object);
 }
Ejemplo n.º 14
0
 public LoginController(IAuthenticationServices authenticationServices)
 {
     this.authenticationServices = authenticationServices;
 }
Ejemplo n.º 15
0
 public DateTimeOwinMiddleware(OwinMiddleware next, IAuthenticationServices authenticationServices) : base(next)
 {
     _authenticationServices = authenticationServices;
 }
Ejemplo n.º 16
0
        public List <string> GetSharedSecret(string textPlain)
        {
            IAuthenticationServices authenticationService = (IAuthenticationServices)this.ContextSpring.GetObject(typeof(AuthenticationServices).Name);

            return(authenticationService.GetSharedSecret(textPlain));
        }
Ejemplo n.º 17
0
 public AccountController(IBaseRepository <User> user, IAuthenticationServices authenticationServices)
 {
     _user = user;
     _authenticationServices = authenticationServices;
 }
Ejemplo n.º 18
0
 /// <summary>
 /// Initializes a new instance of <see cref="AccountController"/>.
 /// </summary>
 /// <param name="configuration">An implementation of <see cref="IConfiguration"/>.</param>
 /// <param name="authenticationServices">An implementation of <see cref="IAuthenticationServices"/>.</param>
 public AccountController(IConfiguration configuration, IAuthenticationServices authenticationServices)
 {
     _configuration          = configuration;
     _authenticationServices = authenticationServices;
 }
Ejemplo n.º 19
0
        public ResultDto SaveChangePassword(ChangePasswordDto dtoChangePassword)
        {
            IAuthenticationServices authenticationService = (IAuthenticationServices)this.ContextSpring.GetObject(typeof(AuthenticationServices).Name);

            return(authenticationService.AuthenticationChangePassword(dtoChangePassword));
        }
Ejemplo n.º 20
0
 public AuthenticatieRepository(IAuthenticationServices authenticationServices)
 {
     _authenticationServices = authenticationServices;
 }
Ejemplo n.º 21
0
 public SettingController(IConfigParamServices iConfigParamServices)
 {
     _iConfigParamServices    = iConfigParamServices;
     _iAuthenticationServices = ((ConfigParamServices)_iConfigParamServices)._iAuthenticationServices;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ActiveDirectoryCredentials"/> class.
 /// </summary>
 /// <param name="authenticationServices">The authentication services</param>
 /// <param name="resource">The resource for which to create the credentials</param>
 public ActiveDirectoryCredentials(IAuthenticationServices authenticationServices, string resource)
 {
     this.authenticationServices = authenticationServices;
     this.resource = resource;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ActiveDirectoryCredentialsFactory"/> class.
 /// </summary>
 /// <param name="authenticationServices">The authentication services</param>
 public ActiveDirectoryCredentialsFactory(IAuthenticationServices authenticationServices)
 {
     this.authenticationServices = authenticationServices;
 }
Ejemplo n.º 24
0
        public ResultUserAuthenticationDto GetAuthentication([Required] string userName, [Required] string password)
        {
            IAuthenticationServices authenticationService = (IAuthenticationServices)this.ContextSpring.GetObject(typeof(AuthenticationServices).Name);

            return(authenticationService.GetAuthentication(userName, password));
        }