Class AbstractOtpRequiredResponseHandler
java.lang.Object
es.kukenan.smartfi.microservice.security.gateway.handler.otp.AbstractOtpRequiredResponseHandler
- Direct Known Subclasses:
GenericOtpRequiredResponseHandler,OtpForLoginWithScaDateExtensionResponseHandler
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 voidhandle(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.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
public abstract 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 IOException, NoSuchAlgorithmException Contract for the OTP required response handler method.- Parameters:
jwt- current authentication.exchange- currentServerWebExchange.cacheInformation- current session information.responseObjectNode- current service response.- 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.
-