Class AbstractOtpRequiredResponseHandler
java.lang.Object
es.kukenan.smartfi.microservice.onboarding.security.otp.AbstractOtpRequiredResponseHandler
- Direct Known Subclasses:
GenericOtpRequiredResponseHandler,OtpForOnboardingResponseHandler
Base class for OTP required response handlers.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected es.kukenan.smartfi.common.utils.CustomObjectMapperObject mapper.protected OtpServiceService utilities for SCA.protected OtpUtilitiesOtp utilities. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract OtpRequiredContract for the OTP required response handler method.protected voidpublishOtpEvent(org.springframework.web.server.ServerWebExchange exchange, OtpCache otpCache, String operationType) Publish an OTP generated event.protected voidsaveOtpProcess(OtpCache otpCache) Store a new OTP process in the cache.
-
Field Details
-
objectMapper
@Autowired protected es.kukenan.smartfi.common.utils.CustomObjectMapper objectMapperObject mapper. -
otpService
Service utilities for SCA. -
otpUtilities
Otp utilities.
-
-
Constructor Details
-
AbstractOtpRequiredResponseHandler
public AbstractOtpRequiredResponseHandler()
-
-
Method Details
-
handle
Contract for the OTP required response handler method.- Parameters:
user- user to send OTP.- Returns:
- OtpRequired
- Throws:
IOException- if anIOExceptionis thrown.NoSuchAlgorithmException- if anNoSuchAlgorithmExceptionis thrown.
-
saveOtpProcess
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- currentServerWebExchange.otpCache- OTP process details.operationType- OTP operation type.
-