Class NamespaceSelector

java.lang.Object
io.fluxzero.proxy.NamespaceSelector

public class NamespaceSelector extends Object
The NamespaceSelector class is responsible for determining and decoding a namespace value from an HTTP web request. It utilizes a JWT-based verification mechanism to decode and validate the namespace value.

This class includes a memoized JwtVerifier for managing JWT verification and a memoized namespace decoding function that decodes and validates the provided namespace JWT token.

  • Field Details

  • Constructor Details

    • NamespaceSelector

      public NamespaceSelector()
  • Method Details

    • select

      public String select(WebRequest webRequest)
      Extracts and decodes the namespace value from the given web request. The namespace value is retrieved from the header identified by FLUXZERO_NAMESPACE_HEADER and is processed using the namespaceDecoder function to decode it.
      Parameters:
      webRequest - the incoming HTTP web request containing the namespace header
      Returns:
      the decoded namespace string, or null if the header is not present or the decoding fails