Class OtpController
java.lang.Object
es.kukenan.smartfi.microservice.security.gateway.controller.OtpController
Controller for Generic Otp process and for specific SCA process.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringREST API base path.static final StringOTP all endpoint path.static final StringOTP endpoint path.private OtpServiceOtp service for check otp value and management access.private es.kukenan.smartfi.common.context.RequestContextManagerRequest context for send events. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAll()Controller for get all Otp.reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<byte[]>>validateOtpGenericProcess(String uuid, String userAgent, String userIp, String processId, es.kukenan.smartfi.microservice.security.gateway.api.OtpBodyRequestDto otpBodyRequestDto, org.springframework.web.server.ServerWebExchange serverWebExchange) Controller for Otp generic process.
-
Field Details
-
API_PATH
REST API base path.- See Also:
-
OTP_GENERIC_PATH
OTP endpoint path.- See Also:
-
OTP_All_PATH
OTP all endpoint path.- See Also:
-
otpService
Otp service for check otp value and management access. -
requestContextManager
@Autowired private es.kukenan.smartfi.common.context.RequestContextManager requestContextManagerRequest 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
-