com.veriplace.client.factory
Interface CallbackFactory

All Known Implementing Classes:
DefaultCallbackFactory

public interface CallbackFactory

Interface for an object that Client and VeriplaceState use to generate callback URLs for OAuth transactions. The standard implementation of this is DefaultCallbackFactory, which provides automatic detection of URL properties and parameters, and allows you to override most of these if needed. You can also create your own implementation of CallbackFactory if you require different behavior.

Since:
2.0

Method Summary
 java.util.Map<java.lang.String,java.lang.String[]> captureParameters(HttpServletRequest request)
          Given an HTTP request, returns a map containing the names and values of all HTTP GET or POST parameters that should be included in a callback.
 java.lang.String createCallbackUrl(HttpServletRequest request, boolean includePath)
          Given an HTTP request, returns a callback URL that should access the same resource as that request.
 

Method Detail

createCallbackUrl

java.lang.String createCallbackUrl(HttpServletRequest request,
                                   boolean includePath)
Given an HTTP request, returns a callback URL that should access the same resource as that request.

Parameters:
request - the current HTTP request
includePath - true if the full URL path should be included (not including the query string); false if it should just be the server and port

captureParameters

java.util.Map<java.lang.String,java.lang.String[]> captureParameters(HttpServletRequest request)
Given an HTTP request, returns a map containing the names and values of all HTTP GET or POST parameters that should be included in a callback.

Parameters:
request - the current HTTP request
Returns:
a map of parameter names and values; each value is an array, since a parameter name may have multiple values