java.lang.Object
es.kukenan.smartfi.microservice.backoffice.service.AuthService

@Service public class AuthService extends Object
Authentication related services.
  • Field Details

    • passwordLength

      @Value("${backoffice.password.length}") private int passwordLength
      Password length.
    • publicKey

      @Value("${kukenfi.publicKey}") private String publicKey
      Key used for generate RSA cipher.
    • userRepository

      @Autowired UserRepository userRepository
      User repository.
    • roleRepository

      @Autowired RolRepository roleRepository
      Rol repository.
    • kukenSaltConfig

      @Autowired private KukenSaltConfig kukenSaltConfig
      Kuken salt configuration.
    • serviceUtilities

      @Autowired protected ServiceUtilities serviceUtilities
      Service Utilities for users services.
    • jwtService

      @Autowired private es.kukenan.smartfi.common.service.jwt.JwtService jwtService
      JwtService.
    • internalApiClient

      @Autowired private InternalApiClient internalApiClient
      Back office clients manager.
    • auditService

      @Autowired private AuditService auditService
      Backoffice endpoints implementation.
    • requestContextManager

      @Autowired private es.kukenan.smartfi.common.context.RequestContextManager requestContextManager
      Request context manager.
    • smtpMailNotificationHandler

      @Autowired private SmtpMailNotificationHandler smtpMailNotificationHandler
      Component for handle SMTP communication inside backoffice.
  • Constructor Details

    • AuthService

      public AuthService()
  • Method Details

    • doLogin

      public org.springframework.http.ResponseEntity<?> doLogin(LoginRequest loginRequest)
      login method for DB authentication.
      Parameters:
      loginRequest - login request data.
      Returns:
      LoginResponse object with user data.
    • getLoginOperation

      private String getLoginOperation(String type)
      Get Login AuditOperation from login type.
      Parameters:
      type - backoffice login type.
      Returns:
      Login AuditOperation.
    • checkCredentials

      protected boolean checkCredentials(LoginRequest loginDto, User user)
    • doResetPassword

      public org.springframework.http.ResponseEntity<?> doResetPassword(ResetPasswordRequest resetPasswordRequest)
      Reset Password method for registered user.
      Parameters:
      resetPasswordRequest - login request data.
      Returns:
      LoginResponse object with user data.