public RegisterCommandHandler( IUserRepository userRepository, IJwtAuthenticationService authenticationTokenService) { this.userRepository = userRepository; this.authenticationTokenService = authenticationTokenService; }
public async Task Invoke(HttpContext context, IJwtAuthenticationService authenticateService) { if (!IsNullOrWhiteSpace(authenticateService .CheckTokenValidate(context.Session.GetString("Token")))) { var currentUser = context.Session.Get <User>("CurrentUser"); var userPermissions = ApiExtension.PostAsync <IEnumerable <Permission>, RequestParameters>( GlobalParameter.ApiBaseAddress, "/api/User/GetUserAllPermissions", new RequestParameters { Param1 = currentUser.Id, Param2 = currentUser.SoftwareId, }, context.Session.GetString("Token")).Result; if (userPermissions.All(p => !string.Equals(p.Action, context.Request.Path.ToString(), StringComparison.CurrentCultureIgnoreCase))) { context.Response.Redirect($"{context.Request.Scheme}://" + $"{context.Request.Host}/Identity/User/Profile"); } await _next.Invoke(context); } else { context.Response.Redirect($"{context.Request.Scheme}://{context.Request.Host}/Home/Login"); } }
public CustomerController(IPersonService personService, IBookService bookService, IJwtAuthenticationService jwtAuthenticationService, IMapper mapper) { this.personService = personService; this.bookService = bookService; this.jwtAuthenticationService = jwtAuthenticationService; this.mapper = mapper; }
public async Task Invoke(HttpContext context, IJwtAuthenticationService authenticateService) { if (!string.IsNullOrWhiteSpace(authenticateService .CheckTokenValidate(context.Request.Headers["Security-Token"]))) { await _next.Invoke(context); } else { context.Response.Redirect($"{context.Request.Scheme}://{context.Request.Host}/Home/Login"); } }
public AccountService( UserManager <DomainModel.User> userManager, SignInManager <DomainModel.User> signInManager, IJwtAuthenticationService jwtAuthenticationService, IEmailService emailService, IdentityErrorDescriber errorDescriber, IConfiguration configuration, IMediator mediator) { this.userManager = userManager; this.signInManager = signInManager; this.jwtAuthenticationService = jwtAuthenticationService; this.emailService = emailService; this.errorDescriber = errorDescriber; this.configuration = configuration; this.mediator = mediator; }
public AccountsController(UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, IJwtAuthenticationService authenticationService) { this.userManager = userManager; this.signInManager = signInManager; this.authenticationService = authenticationService; }
public AuthController(IJwtAuthenticationService _JwtAuthenticationService, IMailService _MailService) { JwtAuthenticationService = _JwtAuthenticationService; MailService = _MailService; }
public CalculosController(ILogger <CalculosController> logger, IJwtAuthenticationService authService) { _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _authService = authService; }
public AccountController(IJwtAuthenticationService jwtAuthenticationService) { this.jwtAuthenticationService = jwtAuthenticationService; }
public AuthenticateController(IJwtAuthenticationService jwtAuthenticationManager) { m_jwtAuthenticationManager = jwtAuthenticationManager; }
public AuthController(UserManager <ApplicationUser> userManager, IJwtAuthenticationService service, IJwtSecurityService jwtService)//IJwtTokenManager jwtTokenManager, { this.userManager = userManager; this.authService = service; this.jwtService = jwtService; }
public UserController(IJwtAuthenticationService jwtAuthenticationService) { _jwtAuthenticationService = jwtAuthenticationService; }