- 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 theTokenHandler.header(Map, String)to create a new header for the extracted parameter.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static QueryParamMappingcreate(Config config)Read a new instance from configuration.static QueryParamMappingcreate(String queryParamName, TokenHandler tokenHandler)Create a new mapping for a query parameter andTokenHandlerto extract the parameter and store it as a new header with possible transformation.static QueryParamMappingcreate(String queryParamName, String headerName)Create a new mapping for a query parameter and a header name.StringqueryParamName()Name of the query parameter to map.TokenHandlertokenHandler()Token handler used to create a header from the parameter.
-
-
-
Method Detail
-
create
public static QueryParamMapping create(String queryParamName, TokenHandler tokenHandler)
Create a new mapping for a query parameter andTokenHandlerto extract the parameter and store it as a new header with possible transformation.- Parameters:
queryParamName- name of parametertokenHandler- 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 parameterheaderName- 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 forTokenHandler- 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
-
-