Class NamespaceSelector
java.lang.Object
io.fluxzero.proxy.NamespaceSelector
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionselect(WebRequest webRequest) Extracts and decodes the namespace value from the given web request.
-
Field Details
-
FLUXZERO_NAMESPACE_HEADER
- See Also:
-
JWKS_URL_PROPERTY
- See Also:
-
-
Constructor Details
-
NamespaceSelector
public NamespaceSelector()
-
-
Method Details
-
select
Extracts and decodes the namespace value from the given web request. The namespace value is retrieved from the header identified byFLUXZERO_NAMESPACE_HEADERand is processed using thenamespaceDecoderfunction to decode it.- Parameters:
webRequest- the incoming HTTP web request containing the namespace header- Returns:
- the decoded namespace string, or
nullif the header is not present or the decoding fails
-