java.lang.Object
es.kukenan.smartfi.microservice.security.gateway.controller.OtpController

@RestController public class OtpController extends Object
Controller for Generic Otp process and for specific SCA process.
  • Field Details

    • API_PATH

      public static final String API_PATH
      REST API base path.
      See Also:
    • OTP_GENERIC_PATH

      public static final String OTP_GENERIC_PATH
      OTP endpoint path.
      See Also:
    • OTP_All_PATH

      public static final String OTP_All_PATH
      OTP all endpoint path.
      See Also:
    • otpService

      @Autowired private OtpService otpService
      Otp service for check otp value and management access.
    • requestContextManager

      @Autowired private es.kukenan.smartfi.common.context.RequestContextManager requestContextManager
      Request context for send events.
  • Constructor Details

    • OtpController

      public OtpController()
  • Method Details

    • validateOtpGenericProcess

      @PatchMapping("/api/v1/validation/{processId}") public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<byte[]>> validateOtpGenericProcess(@RequestHeader String uuid, @RequestHeader(name="X-USER-AGENT",defaultValue="") String userAgent, @RequestHeader(name="X-SKYLINE-USER-IP",defaultValue="") String userIp, @PathVariable String processId, @RequestBody es.kukenan.smartfi.microservice.security.gateway.api.OtpBodyRequestDto otpBodyRequestDto, org.springframework.web.server.ServerWebExchange serverWebExchange) throws NoSuchAlgorithmException
      Controller for Otp generic process.
      Parameters:
      uuid - unique identifier for session cache.
      userAgent - user Agent.
      userIp - user Ip.
      processId - unique identifier of OTP process.
      otpBodyRequestDto - Contains otp value to check with received notification.
      serverWebExchange - exchange contains context info for send events.
      Returns:
      Error if Otp is incorrect
      Throws:
      NoSuchAlgorithmException - exception algorithm.
    • getAll

      @GetMapping("/api/v1/validation/all") public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<List<OtpCache>>> getAll()
      Controller for get all Otp.
      Returns:
      List of OTP