Package org.forgerock.openig.openam
Class RequestResourceUriProvider
java.lang.Object
org.forgerock.openig.openam.RequestResourceUriProvider
- All Implemented Interfaces:
ResourceUriProvider
The
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.- Since:
- 7.0
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Creates and initializes a RequestResourceUriProvider in a heap environment. -
Constructor Summary
ConstructorDescriptionCreate a newRequestResourceUriProvider
based on the defaults.RequestResourceUriProvider
(boolean useOriginalUri, boolean includeQueryParams) Create a newRequestResourceUriProvider
based on the passed parameters. -
Method Summary
Modifier and TypeMethodDescriptionresourceUri
(Context context, Request request) Returns the resource URI as aString
to be used when making policy requests.
-
Constructor Details
-
RequestResourceUriProvider
public RequestResourceUriProvider()Create a newRequestResourceUriProvider
based on the defaults. -
RequestResourceUriProvider
public RequestResourceUriProvider(boolean useOriginalUri, boolean includeQueryParams) Create a newRequestResourceUriProvider
based on the passed parameters.- Parameters:
useOriginalUri
- Set totrue
to make use of the original URI when creating the resourceUri.includeQueryParams
- Set tofalse
to exclude any query parameters in the resourceUri.
-
-
Method Details
-
resourceUri
Description copied from interface:ResourceUriProvider
Returns the resource URI as aString
to be used when making policy requests.- Specified by:
resourceUri
in interfaceResourceUriProvider
- Parameters:
context
- The request context.request
- The request.- Returns:
- a
String
representing the resource URI.
-