Class AbstractOtpRequiredResponseHandler

java.lang.Object
es.kukenan.smartfi.microservice.security.gateway.handler.otp.AbstractOtpRequiredResponseHandler
Direct Known Subclasses:
GenericOtpRequiredResponseHandler, OtpForLoginWithScaDateExtensionResponseHandler

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

    Fields
    Modifier and Type
    Field
    Description
    protected es.kukenan.smartfi.common.utils.CustomObjectMapper
    Object mapper.
    protected OtpService
    Service utilities for SCA.
    protected OtpUtilities
    Otp utilities.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract void
    handle(es.kukenan.smartfi.common.service.jwt.JwtBearerToken jwt, org.springframework.web.server.ServerWebExchange exchange, es.kukenan.smartfi.microservice.security.gateway.cache.model.SessionCache cacheInformation, com.fasterxml.jackson.databind.node.ObjectNode responseObjectNode)
    Contract for the OTP required response handler method.
    protected void
    publishOtpEvent(org.springframework.web.server.ServerWebExchange exchange, OtpCache otpCache, String operationType)
    Publish an OTP generated event.
    protected void
    Store a new OTP process in the cache.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 void handle(es.kukenan.smartfi.common.service.jwt.JwtBearerToken jwt, org.springframework.web.server.ServerWebExchange exchange, es.kukenan.smartfi.microservice.security.gateway.cache.model.SessionCache cacheInformation, com.fasterxml.jackson.databind.node.ObjectNode responseObjectNode) throws IOException, NoSuchAlgorithmException
      Contract for the OTP required response handler method.
      Parameters:
      jwt - current authentication.
      exchange - current ServerWebExchange.
      cacheInformation - current session information.
      responseObjectNode - current service response.
      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.