Class RequestResourceUriProvider

java.lang.Object
org.forgerock.openig.openam.RequestResourceUriProvider
All Implemented Interfaces:
ResourceUriProvider

public class RequestResourceUriProvider extends Object implements 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
  • Constructor Details

    • RequestResourceUriProvider

      public RequestResourceUriProvider()
      Create a new RequestResourceUriProvider based on the defaults.
    • RequestResourceUriProvider

      public RequestResourceUriProvider(boolean useOriginalUri, boolean includeQueryParams)
      Create a new RequestResourceUriProvider based on the passed parameters.
      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.
  • Method Details

    • resourceUri

      public String resourceUri(Context context, Request request)
      Description copied from interface: ResourceUriProvider
      Returns the resource URI as a String to be used when making policy requests.
      Specified by:
      resourceUri in interface ResourceUriProvider
      Parameters:
      context - The request context.
      request - The request.
      Returns:
      a String representing the resource URI.