Class ServletOtpRuleHandlerFactory

java.lang.Object
es.kukenan.smartfi.common.security.web.otp.ServletOtpRuleHandlerFactory

@Component public class ServletOtpRuleHandlerFactory extends Object
This component is the one used to build a handler for the OtpRule applicable for a given endpoint. See createRuleHandler(HttpServletRequest, WalletAuthentication).
  • Field Details

    • otpProperties

      @Autowired private OtpProperties otpProperties
      Endpoints list that need OTP validation.
    • customObjectMapper

      @Autowired private CustomObjectMapper customObjectMapper
      Custom object mapper.
  • Constructor Details

    • ServletOtpRuleHandlerFactory

      public ServletOtpRuleHandlerFactory()
  • Method Details

    • createRuleHandler

      public OtpRuleHandler createRuleHandler(javax.servlet.http.HttpServletRequest request, WalletAuthentication walletAuthentication)
      Find the OtpRuleHandler for the given HTTP URI and method.
      Parameters:
      request - HTTP servlet request.
      walletAuthentication - current authentication.
      Returns:
      the rule handler for the given endpoint. null will be returned if the given endpoint has no OtpProperties.OtpRule defined.
    • extractInputStream

      private InputStream extractInputStream(javax.servlet.http.HttpServletRequest request)