Class GenericOtpRequiredResponseHandler

java.lang.Object
es.kukenan.smartfi.microservice.security.gateway.handler.otp.AbstractOtpRequiredResponseHandler
es.kukenan.smartfi.microservice.security.gateway.handler.otp.GenericOtpRequiredResponseHandler

@Component public class GenericOtpRequiredResponseHandler extends AbstractOtpRequiredResponseHandler
Generic OTP required response handler.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final es.kukenan.smartfi.logger.WalletLogger
    Instance logger.
    private final String
    path signature.
    private String
    signature host.

    Fields inherited from class es.kukenan.smartfi.microservice.security.gateway.handler.otp.AbstractOtpRequiredResponseHandler

    objectMapper, otpService, otpUtilities
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private boolean
    checkSendOtp(es.kukenan.smartfi.common.security.web.otp.OtpRequiredConfiguration otpConfig, org.springframework.web.server.ServerWebExchange exchange)
     
    private OtpCache
    createOtpCache(es.kukenan.smartfi.common.security.web.otp.OtpRequiredConfiguration otpConfig, com.fasterxml.jackson.databind.JsonNode operationalInfo, es.kukenan.smartfi.microservice.security.gateway.cache.model.SessionCache cacheInformation, org.springframework.web.server.ServerWebExchange exchange, byte[] body, es.kukenan.smartfi.common.service.jwt.JwtBearerToken jwt)
     
    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.

    Methods inherited from class es.kukenan.smartfi.microservice.security.gateway.handler.otp.AbstractOtpRequiredResponseHandler

    publishOtpEvent, saveOtpProcess

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • pathSignature

      private final String pathSignature
      path signature.
      See Also:
    • log

      private final es.kukenan.smartfi.logger.WalletLogger log
      Instance logger.
    • signatureHost

      @Value("${security.gateway.service.signature.uri}") private String signatureHost
      signature host.
  • Constructor Details

    • GenericOtpRequiredResponseHandler

      public GenericOtpRequiredResponseHandler()
  • Method Details

    • handle

      public 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 NoSuchAlgorithmException
      Description copied from class: AbstractOtpRequiredResponseHandler
      Contract for the OTP required response handler method.
      Specified by:
      handle in class AbstractOtpRequiredResponseHandler
      Parameters:
      jwt - current authentication.
      exchange - current ServerWebExchange.
      cacheInformation - current session information.
      responseObjectNode - current service response.
      Throws:
      NoSuchAlgorithmException - if an NoSuchAlgorithmException is thrown.
    • checkSendOtp

      private boolean checkSendOtp(es.kukenan.smartfi.common.security.web.otp.OtpRequiredConfiguration otpConfig, org.springframework.web.server.ServerWebExchange exchange)
    • createOtpCache

      private OtpCache createOtpCache(es.kukenan.smartfi.common.security.web.otp.OtpRequiredConfiguration otpConfig, com.fasterxml.jackson.databind.JsonNode operationalInfo, es.kukenan.smartfi.microservice.security.gateway.cache.model.SessionCache cacheInformation, org.springframework.web.server.ServerWebExchange exchange, byte[] body, es.kukenan.smartfi.common.service.jwt.JwtBearerToken jwt) throws NoSuchAlgorithmException
      Throws:
      NoSuchAlgorithmException