public class RequestResourceUriProvider extends GenericHeaplet implements ResourceUriProvider
RequestResourceUriProvider
has the following configuration:
{
"type": "RequestResourceUriProvider",
"config": {
"useOriginalUri" : boolean [OPTIONAL - default to false. When true, the original URI rather than
the request URI will be used to create the resourceUri.]
"includeQueryParams" : boolean [OPTIONAL - default to true. When false, any query parameters
in the URI will be excluded from the resourceUri.]
}
}
Returns the URI to be used as the resource for the policy request based on either the request URI
or the original URI.Constructor and Description |
---|
RequestResourceUriProvider()
Create a new
RequestResourceUriProvider based on the defaults. |
RequestResourceUriProvider(boolean useOriginalUri,
boolean includeQueryParams)
Create a new
RequestResourceUriProvider based on the passed parameters. |
Modifier and Type | Method and Description |
---|---|
Object |
create()
Called to request the heaplet create an object.
|
String |
resourceUri(Context context,
Request request)
Returns the resource URI as a
String to be used when making policy requests. |
create, destroy, endpointRegistry, evaluatedWithHeapProperties, expression, getConfig, getHeap, getSecretService, getType, meterRegistryHolder, start
public RequestResourceUriProvider()
RequestResourceUriProvider
based on the defaults.public RequestResourceUriProvider(boolean useOriginalUri, boolean includeQueryParams)
RequestResourceUriProvider
based on the passed parameters.useOriginalUri
- Set to true
to make use of the original URI when creating the resourceUri.includeQueryParams
- Set to false
to exclude any query parameters in the resourceUri.public String resourceUri(Context context, Request request)
ResourceUriProvider
String
to be used when making policy requests.resourceUri
in interface ResourceUriProvider
context
- The request context.request
- The request.String
representing the resource URI.public Object create() throws HeapException
GenericHeaplet
Heaplet.create(Name, JsonValue, Heap)
after initializing
the protected field members. Implementations should parse configuration
but not acquire resources, start threads, or log any initialization
messages. These tasks should be performed by the GenericHeaplet.start()
method.create
in class GenericHeaplet
HeapException
- if an exception occurred during creation of the heap object
or any of its dependencies.Copyright 2011-2017 ForgeRock AS.