Class GenericOtpRequiredResponseHandler
java.lang.Object
es.kukenan.smartfi.microservice.security.gateway.handler.otp.AbstractOtpRequiredResponseHandler
es.kukenan.smartfi.microservice.security.gateway.handler.otp.GenericOtpRequiredResponseHandler
@Component
public class GenericOtpRequiredResponseHandler
extends AbstractOtpRequiredResponseHandler
Generic OTP required response handler.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final es.kukenan.smartfi.logger.WalletLoggerInstance logger.private final Stringpath signature.private Stringsignature host.Fields inherited from class es.kukenan.smartfi.microservice.security.gateway.handler.otp.AbstractOtpRequiredResponseHandler
objectMapper, otpService, otpUtilities -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate booleancheckSendOtp(es.kukenan.smartfi.common.security.web.otp.OtpRequiredConfiguration otpConfig, org.springframework.web.server.ServerWebExchange exchange) private OtpCachecreateOtpCache(es.kukenan.smartfi.common.security.web.otp.OtpRequiredConfiguration otpConfig, com.fasterxml.jackson.databind.JsonNode operationalInfo, es.kukenan.smartfi.microservice.security.gateway.cache.model.SessionCache cacheInformation, org.springframework.web.server.ServerWebExchange exchange, byte[] body, es.kukenan.smartfi.common.service.jwt.JwtBearerToken jwt) 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.Methods inherited from class es.kukenan.smartfi.microservice.security.gateway.handler.otp.AbstractOtpRequiredResponseHandler
publishOtpEvent, saveOtpProcess
-
Field Details
-
pathSignature
path signature.- See Also:
-
log
private final es.kukenan.smartfi.logger.WalletLogger logInstance logger. -
signatureHost
signature host.
-
-
Constructor Details
-
GenericOtpRequiredResponseHandler
public GenericOtpRequiredResponseHandler()
-
-
Method Details
-
handle
public 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 NoSuchAlgorithmException Description copied from class:AbstractOtpRequiredResponseHandlerContract for the OTP required response handler method.- Specified by:
handlein classAbstractOtpRequiredResponseHandler- Parameters:
jwt- current authentication.exchange- currentServerWebExchange.cacheInformation- current session information.responseObjectNode- current service response.- Throws:
NoSuchAlgorithmException- if anNoSuchAlgorithmExceptionis thrown.
-
checkSendOtp
private boolean checkSendOtp(es.kukenan.smartfi.common.security.web.otp.OtpRequiredConfiguration otpConfig, org.springframework.web.server.ServerWebExchange exchange) -
createOtpCache
private OtpCache createOtpCache(es.kukenan.smartfi.common.security.web.otp.OtpRequiredConfiguration otpConfig, com.fasterxml.jackson.databind.JsonNode operationalInfo, es.kukenan.smartfi.microservice.security.gateway.cache.model.SessionCache cacheInformation, org.springframework.web.server.ServerWebExchange exchange, byte[] body, es.kukenan.smartfi.common.service.jwt.JwtBearerToken jwt) throws NoSuchAlgorithmException - Throws:
NoSuchAlgorithmException
-