Class QueryParamMapping

java.lang.Object
io.helidon.security.QueryParamMapping

public final class QueryParamMapping extends Object
Definition of a map to bind a query param to a header. Uses the TokenHandler.header(Map, String) to create a new header for the extracted parameter.
  • Method Details

    • create

      public static QueryParamMapping create(String queryParamName, TokenHandler tokenHandler)
      Create a new mapping for a query parameter and TokenHandler to extract the parameter and store it as a new header with possible transformation.
      Parameters:
      queryParamName - name of parameter
      tokenHandler - handler to extract and store the header value
      Returns:
      a new mapping
    • create

      public static QueryParamMapping create(String queryParamName, String headerName)
      Create a new mapping for a query parameter and a header name.
      Parameters:
      queryParamName - name of parameter
      headerName - name of a header to store the value of the parameter in
      Returns:
      a new mapping
    • create

      public static QueryParamMapping create(Config config)
      Read a new instance from configuration. The current node should contain a "name" and configuration for TokenHandler
      Parameters:
      config - configuration instance
      Returns:
      new query parameter handler instance
    • queryParamName

      public String queryParamName()
      Name of the query parameter to map.
      Returns:
      parameter name
    • tokenHandler

      public TokenHandler tokenHandler()
      Token handler used to create a header from the parameter.
      Returns:
      header token handler