Class LoginRememberService

java.lang.Object
es.kukenan.smartfi.microservice.clients.service.login.strategy.AbstractLoginService<es.kukenan.smartfi.microservice.clients.dto.LoginRememberDto>
es.kukenan.smartfi.microservice.clients.service.login.LoginRememberService
All Implemented Interfaces:
LoginServiceStrategy<es.kukenan.smartfi.microservice.clients.dto.LoginRememberDto>

@Service public class LoginRememberService extends AbstractLoginService<es.kukenan.smartfi.microservice.clients.dto.LoginRememberDto>
Service to do user login.
  • Field Details

    • kukenSaltConfig

      @Autowired private KukenSaltConfig kukenSaltConfig
      Core salt configuration.
  • Constructor Details

    • LoginRememberService

      public LoginRememberService()
  • Method Details

    • findUserInDb

      protected User findUserInDb(es.kukenan.smartfi.microservice.clients.dto.LoginRememberDto loginDto)
      Description copied from class: AbstractLoginService
      Find the user in the database with the given login details.
      Specified by:
      findUserInDb in class AbstractLoginService<es.kukenan.smartfi.microservice.clients.dto.LoginRememberDto>
      Parameters:
      loginDto - login details.
      Returns:
      The user in database. Must not be null, if the user is not found the proper exception must be thrown.
    • checkCredentials

      protected boolean checkCredentials(es.kukenan.smartfi.microservice.clients.dto.LoginRememberDto loginDto, User user)
      Description copied from class: AbstractLoginService
      Check the given user credentials (found with the given login details).
      Specified by:
      checkCredentials in class AbstractLoginService<es.kukenan.smartfi.microservice.clients.dto.LoginRememberDto>
      Parameters:
      loginDto - login details received to find the user.
      user - the user found.
      Returns:
      the user if the credentials presented were correct. In other case, then proper exception must be thrown.
    • createLoginResponse

      protected es.kukenan.smartfi.microservice.clients.dto.LoginResponseDto createLoginResponse(es.kukenan.smartfi.microservice.clients.dto.LoginRememberDto loginRememberDto, User user)
      Method to check if pair values username and password are at database.
      Specified by:
      createLoginResponse in class AbstractLoginService<es.kukenan.smartfi.microservice.clients.dto.LoginRememberDto>
      Parameters:
      loginRememberDto - data od user..
      user - user data found.
      Returns:
      LoginState.