public AuthenticateHandler(IResponse response, IMapper mapper, ILoginContext loginContext, ITokenGenerator tokenGenerator)
 {
     this.response       = response;
     this.mapper         = mapper;
     this.loginContext   = loginContext;
     this.tokenGenerator = tokenGenerator;
 }
Example #2
0
 public FriendManager(
     ILoginContext loginContext,
     IFriendRequestAccess access
     )
 {
     this.loginContext = loginContext;
     this.access       = access;
 }
        public Form1()
        {
            InitializeComponent();

            _loginContext = new LoginContext();

            _weatherForecastContext = new WeatherForecastContext();

            _usuario = new Usuario();
        }
 public LoginManager(
     SignInManager <User> signInManager,
     IDisplayUserAccess displayUserAccess,
     ModelValidator modelValidator,
     ILoginContext loginContext
     )
 {
     this.signInManager     = signInManager;
     this.displayUserAccess = displayUserAccess;
     this.modelValidator    = modelValidator;
     this.loginContext      = loginContext;
 }
Example #5
0
        public async Task <Result <string> > Login(ILoginContext model)
        {
            var result = await this.signInManager.PasswordSignInAsync(
                model.Username,
                model.Password,
                model.RememberMe,
                lockoutOnFailure : false);

            if (!result.Succeeded)
            {
                return(Result <string> .Failure(result.ToString()));
            }

            var jwtToken = JwtTokenFactory.Create(
                model.Username,
                configuration["Jwt:Key"],
                configuration["Jwt:Issuer"],
                TimeSpan.FromDays(int.Parse(configuration["Jwt:ExpirationInDays"])));

            return(Result <string> .Success(jwtToken));
        }
Example #6
0
 public LoginUow(ILoginContext context, IRepositoryProvider repositoryProvider) : base(context, repositoryProvider)
 {
 }
Example #7
0
 public LoginLogic(ILoginContext context)
 {
     loginContext = context;
 }
Example #8
0
 public LoginUow(ILoginContext context, IRepositoryProvider repositoryProvider, IAuditLog auditLog) : base(context, repositoryProvider, auditLog)
 {
 }
 public LoginRepository(ILoginContext context)
 {
     _context = context;
 }
Example #10
0
 public DisplayUserRepository(IDisplayUserAccess access, ILoginContext loginContext)
 {
     this.access       = access;
     this.loginContext = loginContext;
 }
Example #11
0
 public CurrentController(ILoginContext <User> loginCtx)
 {
     this.LoginCtx = loginCtx;
 }
Example #12
0
 public ProfileController(ILoginContext <User> loginCtx)
 {
     this.LoginCtx = loginCtx;
 }
 public FriendManagerTest()
 {
     friendManager = GetService <IFriendManager>();
     loginContext  = GetService <ILoginContext>();
 }