Class AbstractOtpRequiredResponseHandler

java.lang.Object
es.kukenan.smartfi.microservice.onboarding.security.otp.AbstractOtpRequiredResponseHandler
Direct Known Subclasses:
GenericOtpRequiredResponseHandler, OtpForOnboardingResponseHandler

public abstract class AbstractOtpRequiredResponseHandler extends Object
Base class for OTP required response handlers.
  • Field Details

    • objectMapper

      @Autowired protected es.kukenan.smartfi.common.utils.CustomObjectMapper objectMapper
      Object mapper.
    • otpService

      @Autowired protected OtpService otpService
      Service utilities for SCA.
    • otpUtilities

      @Autowired protected OtpUtilities otpUtilities
      Otp utilities.
  • Constructor Details

    • AbstractOtpRequiredResponseHandler

      public AbstractOtpRequiredResponseHandler()
  • Method Details

    • handle

      public abstract OtpRequired handle(User user) throws IOException, NoSuchAlgorithmException
      Contract for the OTP required response handler method.
      Parameters:
      user - user to send OTP.
      Returns:
      OtpRequired
      Throws:
      IOException - if an IOException is thrown.
      NoSuchAlgorithmException - if an NoSuchAlgorithmException is thrown.
    • saveOtpProcess

      protected void saveOtpProcess(OtpCache otpCache)
      Store a new OTP process in the cache.
      Parameters:
      otpCache - OTP process details.
    • publishOtpEvent

      protected void publishOtpEvent(org.springframework.web.server.ServerWebExchange exchange, OtpCache otpCache, String operationType)
      Publish an OTP generated event. Notifications service will deliver it using proper channels to the proper user.
      Parameters:
      exchange - current ServerWebExchange.
      otpCache - OTP process details.
      operationType - OTP operation type.