Class RedirectCallback
- java.lang.Object
-
- com.sun.identity.authentication.spi.RedirectCallback
-
- All Implemented Interfaces:
Serializable,Callback
public class RedirectCallback extends Object implements Callback, Serializable
ThisRedirectCallbackclass implementsCallbackand is used by the authentication module when redirect to a particulat URL is required with specific redirect data.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RedirectCallback()Constructs aRedirectCallbackobject.RedirectCallback(String redirectUrl, Map redirectData, String method)Constructs aRedirectCallbackobject with redirect URL,redirect data and redirect method.RedirectCallback(String redirectUrl, Map redirectData, String method, String statusParameter, String redirectBackUrlCookie)Constructs aRedirectCallbackobject with redirect URL,redirect data,redirect method,status parameter and redirect back URL Cookie name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetMethod()Returns the Method used for redirection, either "GET" or "POST".StringgetRedirectBackUrlCookieName()Returns the redirectBackUrlCookie name to be set as the OpenAM server URL when redirecting to external web site.Map<String,String>getRedirectData()Returns the data to be redirected to redirect URL.StringgetRedirectUrl()Returns the URL to be redirected to.StringgetStatus()Returns the status as the result of redirection, either "SUCCESS" or "FAILED".StringgetStatusParameter()Returns the statusParameter to be checked from HttpServletRequest object at the result of redirection.booleangetTrackingCookie()Gets the value of this RedirectCallback's trackingCookie, indicating whether we should store information about the current authId in a cookie via the XUI.voidsetMethod(String method)Sets the Method used for redirection, either "GET" or "POST".voidsetRedirectBackUrlCookieName(String redirectBackUrlCookie)Sets the redirectBackUrlCookie name to be set as the OpenAM server URL when redirecting to external web site.voidsetRedirectData(Map redirectData)Sets the data to be redirected to redirect URL.voidsetRedirectUrl(String redirectUrl)Sets the URL to be redirected to.voidsetStatus(String status)Sets the status as the result of redirection, either "SUCCESS" or "FAILED".voidsetStatusParameter(String statusParameter)Sets the status parameter to be checked from HTTP Servlet Request object at the result of redirection.voidsetTrackingCookie(boolean enableCookie)Whether the XUI should execute this immediately, or expect we'll be returned from it -- necessary to be set if this redirect is expected to be returned from.
-
-
-
Field Detail
-
SUCCESS
public static final String SUCCESS
The status as the result of redirection, as "SUCCESS".- See Also:
- Constant Field Values
-
FAILED
public static final String FAILED
The status as the result of redirection, as "FAILED".- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RedirectCallback
public RedirectCallback()
Constructs aRedirectCallbackobject.
-
RedirectCallback
public RedirectCallback(String redirectUrl, Map redirectData, String method)
Constructs aRedirectCallbackobject with redirect URL,redirect data and redirect method.- Parameters:
redirectUrl- URL to be redirected to.redirectData- the data to be redirected to redirect URL.method- Method used for redirection, either "GET" or "POST".
-
RedirectCallback
public RedirectCallback(String redirectUrl, Map redirectData, String method, String statusParameter, String redirectBackUrlCookie)
Constructs aRedirectCallbackobject with redirect URL,redirect data,redirect method,status parameter and redirect back URL Cookie name.- Parameters:
redirectUrl- URL to be redirected to.redirectData- the data to be redirected to redirect URL.method- Method used for redirection, either "GET" or "POST".statusParameter- statusParameter to be checked from HttpServletRequest object at the result of redirection.redirectBackUrlCookie- redirectBackUrlCookie name to be set as the OpenAM server URL when redirecting to external web site.
-
-
Method Detail
-
setRedirectUrl
public void setRedirectUrl(String redirectUrl)
Sets the URL to be redirected to.- Parameters:
redirectUrl- URL to be redirected to.
-
getRedirectUrl
public String getRedirectUrl()
Returns the URL to be redirected to.- Returns:
- the URL to be redirected to.
-
setRedirectData
public void setRedirectData(Map redirectData)
Sets the data to be redirected to redirect URL. This data is in the form of HashMap of name / value pairs.- Parameters:
redirectData- the data to be redirected to redirect URL.
-
getRedirectData
public Map<String,String> getRedirectData()
Returns the data to be redirected to redirect URL.- Returns:
- the Map of data to be redirected to redirect URL.
-
setMethod
public void setMethod(String method)
Sets the Method used for redirection, either "GET" or "POST".- Parameters:
method- Method used for redirection, either "GET" or "POST".
-
getMethod
public String getMethod()
Returns the Method used for redirection, either "GET" or "POST".- Returns:
- the Method used for redirection, either "GET" or "POST".
-
setStatus
public void setStatus(String status)
Sets the status as the result of redirection, either "SUCCESS" or "FAILED".- Parameters:
status- status as the result of redirection, either "SUCCESS" or "FAILED".
-
getStatus
public String getStatus()
Returns the status as the result of redirection, either "SUCCESS" or "FAILED".- Returns:
- the status as the result of redirection, either "SUCCESS" or "FAILED".
-
setStatusParameter
public void setStatusParameter(String statusParameter)
Sets the status parameter to be checked from HTTP Servlet Request object at the result of redirection.- Parameters:
statusParameter- Status parameter.
-
getStatusParameter
public String getStatusParameter()
Returns the statusParameter to be checked from HttpServletRequest object at the result of redirection.- Returns:
- the statusParameter to be checked from HttpServletRequest object at the result of redirection.
-
setRedirectBackUrlCookieName
public void setRedirectBackUrlCookieName(String redirectBackUrlCookie)
Sets the redirectBackUrlCookie name to be set as the OpenAM server URL when redirecting to external web site.- Parameters:
redirectBackUrlCookie- redirectBackUrlCookie name to be set as the OpenAM server URL when redirecting to external web site.
-
setTrackingCookie
public void setTrackingCookie(boolean enableCookie)
Whether the XUI should execute this immediately, or expect we'll be returned from it -- necessary to be set if this redirect is expected to be returned from.- Parameters:
enableCookie- if a cookie should store the current authId position.
-
getTrackingCookie
public boolean getTrackingCookie()
Gets the value of this RedirectCallback's trackingCookie, indicating whether we should store information about the current authId in a cookie via the XUI.- Returns:
- true if we should store, false otherwise.
-
getRedirectBackUrlCookieName
public String getRedirectBackUrlCookieName()
Returns the redirectBackUrlCookie name to be set as the OpenAM server URL when redirecting to external web site.- Returns:
- the redirectBackUrlCookie name to be set as the OpenAM server URL when redirecting to external web site.
-
-