Class AlreadyAuthenticatedLoginService
java.lang.Object
es.kukenan.smartfi.microservice.clients.service.login.AlreadyAuthenticatedLoginService
Service for login when the request is already authenticated.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcheckLoginRequest(es.kukenan.smartfi.microservice.clients.dto.LoginRequestDto loginRequest, User user) Check if there is no conflict between the login request and the authenticated user.private ZonedDateTimeGet last login date from the given user entity.es.kukenan.smartfi.microservice.clients.dto.LoginResponseDtoPost login action when the body of the request contains no credentials.
-
Field Details
-
userRepository
UserDevice repository.
-
-
Constructor Details
-
AlreadyAuthenticatedLoginService
public AlreadyAuthenticatedLoginService()
-
-
Method Details
-
login
public es.kukenan.smartfi.microservice.clients.dto.LoginResponseDto login(es.kukenan.smartfi.microservice.clients.dto.LoginRequestDto loginRequest, UserLog userLog) Post login action when the body of the request contains no credentials.- Parameters:
loginRequest- Request object which contains company_id of user anonymous.userLog- Bean for auditory log.- Returns:
- Login response with already authenticated user data.
-
checkLoginRequest
private void checkLoginRequest(es.kukenan.smartfi.microservice.clients.dto.LoginRequestDto loginRequest, User user) Check if there is no conflict between the login request and the authenticated user.- Parameters:
loginRequest- login request.user- authenticated user.
-
lastLogin
Get last login date from the given user entity.- Parameters:
user- user entity.- Returns:
- the last login date, if any.
-