Ejemplo n.º 1
0
 public AuthController(IUserService <User> userService, ISessionManager sessionManager, ILogger <AuthController> logger, ICryptoRSA cryptoRSA)
 {
     _iUserService   = userService;
     _sessionManager = sessionManager;
     _logger         = logger;
     _cryptoRSA      = cryptoRSA;
 }
Ejemplo n.º 2
0
        public override void OnActionExecuting(ActionExecutingContext context)
        {
            ISecurityService <KeyInfo> securityRepository = (ISecurityService <KeyInfo>)context.HttpContext.RequestServices.GetService(typeof(ISecurityService <KeyInfo>));
            ICryptoRSA cryptoRSA = (ICryptoRSA)context.HttpContext.RequestServices.GetService(typeof(ICryptoRSA));
            KeyInfo    keyInfo   = securityRepository.Get();

            cryptoRSA.ImportBinaryKeys(Convert.FromBase64String(keyInfo.PublicKey));
        }
 public SecurityController(ICryptoRSA cryptoService)
 {
     _cryptoService = cryptoService;
 }
Ejemplo n.º 4
0
 public AuthController(IUserEventRepository <User> userRepository, IAuthRepository <RegisterForm, LoginForm, User> authRepository, ISessionManager sessionManager, ICryptoRSA cryptoService) : base(sessionManager)
 {
     _authRepository = authRepository;
     _cryptoService  = cryptoService;
     _userRepository = userRepository;
 }
Ejemplo n.º 5
0
 public UserController(ICryptoRSA cryptoService)
 {
     _cryptoService      = cryptoService;
     _userRepository     = new UserRepository();
     _passwordRepository = new UserPasswordRepository();
 }
Ejemplo n.º 6
0
 public AuthController(ICryptoRSA cryptoService)
 {
     _cryptoService = cryptoService;
 }
Ejemplo n.º 7
0
 public UserController(IUserService <User> clientService, ITokenService tokenService, ICryptoRSA cryptoService)
 {
     _clientService = clientService;
     _tokenService  = tokenService;
     _cryptoService = cryptoService;
 }
Ejemplo n.º 8
0
 public AuthController(AuthRepository authRepository, ICryptoRSA cryptoRSA)
 {
     _authRepository = authRepository;
     _cryptoRSA      = cryptoRSA;
 }
Ejemplo n.º 9
0
 public UserController(ApiTokenRequester apiTokenRequester, IUserEventRepository <User> userRequester, ICryptoRSA cryptoService, ISessionManager sessionManager) : base(sessionManager)
 {
     _cryptoService     = cryptoService;
     _apiTokenRequester = apiTokenRequester;
     _userRequester     = userRequester;
 }
Ejemplo n.º 10
0
 public AuthController(ILogger <SecurityController> logger, ICryptoRSA cryptoService, IAuthenticateRepository <RegisterForm, LoginForm, User> authRepository)
 {
     _authRepository = authRepository;
     _logger         = logger;
     _cryptoService  = cryptoService;
 }