Class WebExchangeSessionHandler

java.lang.Object
es.kukenan.smartfi.microservice.security.gateway.handler.WebExchangeSessionHandler

@Component public class WebExchangeSessionHandler extends Object
Handler request decrypt request body.
  • Field Details

    • sessionCacheOperation

      @Autowired private SessionCacheOperation sessionCacheOperation
      CacheOperation cache operations.
    • encryptDecryptData

      @Autowired private EncryptDecryptData encryptDecryptData
      EncryptDecryptData operations.
    • sessionCacheUtilities

      @Autowired private SessionCacheUtilities sessionCacheUtilities
      Session cache operations.
  • Constructor Details

    • WebExchangeSessionHandler

      public WebExchangeSessionHandler()
  • Method Details

    • handlerApiRequestExchangeSessionHandle

      public void handlerApiRequestExchangeSessionHandle(org.springframework.web.server.ServerWebExchange exchange)
      Get uuid header in request and decrypt body request and add authorization header.
      Parameters:
      exchange - Server web exchange for share attributes.
    • decryptData

      public byte[] decryptData(String requestBody, es.kukenan.smartfi.microservice.security.gateway.cache.model.SessionCache sessionCache) throws IOException
      Decrypt data request for security gateway endpoints.
      Parameters:
      requestBody - Body request with encrypted data.
      sessionCache - Session cache for get symmetric key and seed for decrupt request body.
      Returns:
      byte[] decrypted request array of bytes.
      Throws:
      IOException - Object mapper for get json body request.
    • getWebExchangeSession

      public es.kukenan.smartfi.microservice.security.gateway.cache.model.SessionCache getWebExchangeSession(org.springframework.web.server.ServerWebExchange exchange)
      Operation cache for request.
      Parameters:
      exchange - server web exchange.
      Returns:
      session cache operation.