Class LoginCommandHandler
- Namespace
- KadicAuth.Application.Auth.Commands.LoginCommands
- Assembly
- KadicAuth.Application.dll
public sealed class LoginCommandHandler : IRequestHandler<LoginCommand, LoginResponseDto>
- Inheritance
-
objectLoginCommandHandler
- Implements
Constructors
LoginCommandHandler(IAuthRepository, IUserTenantBranchRepository, IPasswordHasher, IJwtTokenGenerator, IRefreshTokenRepository, IUserSessionRepository, ILoginAttemptRepository, IPlatformAdminService, IStringLocalizer<AuthMessages>, IAuditService?, IAuthUnitOfWork?, IOptions<JwtSettings>?, ILogger<LoginCommandHandler>?)
public LoginCommandHandler(IAuthRepository authRepository, IUserTenantBranchRepository userTenantBranchRepository, IPasswordHasher passwordHasher, IJwtTokenGenerator jwtTokenGenerator, IRefreshTokenRepository refreshTokenRepository, IUserSessionRepository userSessionRepository, ILoginAttemptRepository loginAttemptRepository, IPlatformAdminService platformAdminService, IStringLocalizer<AuthMessages> localizer, IAuditService? auditService = null, IAuthUnitOfWork? unitOfWork = null, IOptions<JwtSettings>? jwtOptions = null, ILogger<LoginCommandHandler>? logger = null)
Parameters
authRepositoryIAuthRepositoryuserTenantBranchRepositoryIUserTenantBranchRepositorypasswordHasherIPasswordHasherjwtTokenGeneratorIJwtTokenGeneratorrefreshTokenRepositoryIRefreshTokenRepositoryuserSessionRepositoryIUserSessionRepositoryloginAttemptRepositoryILoginAttemptRepositoryplatformAdminServiceIPlatformAdminServicelocalizerIStringLocalizer<AuthMessages>auditServiceIAuditServiceunitOfWorkIAuthUnitOfWorkjwtOptionsIOptions<JwtSettings>loggerILogger<LoginCommandHandler>
Methods
Handle(LoginCommand, CancellationToken)
Handles a request
public Task<LoginResponseDto> Handle(LoginCommand request, CancellationToken cancellationToken)
Parameters
requestLoginCommandThe request
cancellationTokenCancellationTokenCancellation token
Returns
- Task<LoginResponseDto>
Response from the request