Class UserLoginCommandHandler
Namespace: Identity.Application.Requests.Handlers.User
Assembly: Identity.Application.dll
Inheritance
object ← UserLoginCommandHandler
Implements
IRequestHandler<UserLoginCommand, Result<TokenResponse\>\>
Inherited Members
object.Equals\(object?\), object.Equals\(object?, object?\), object.GetHashCode\(\), object.GetType\(\), object.ReferenceEquals\(object?, object?\), object.ToString\(\)
Constructors
UserLoginCommandHandler\(IUserRepository, IPasswordHasher<User\>, IJwtHelper\)
Handler that check credentials sent by the client and return a Identity.Application.Responses.Jwt.TokenResponse to make the Identity.Application.Requests.Handlers.User logged in.
Parameters
userRepository IUserRepository
Repository of Identity.Application.Requests.Handlers.User.
passwordHasher IPasswordHasher < User \>
Microsoft.AspNetCore.Identity.IPasswordHasher%601 is a class that hashes password with encryption and check if they match with a given entry.
jwtHelper IJwtHelper
JWT Helper that defines methods to help manipulate and create JWT.
Methods
Handle\(UserLoginCommand, CancellationToken\)
Handles a request
Parameters
request UserLoginCommand
The request
cancellationToken CancellationToken
Cancellation token
Returns
Task <Result< TokenResponse \>\>
Response from the request