Class RedirectCallback

  • All Implemented Interfaces:
    Serializable, Callback

    public class RedirectCallback
    extends Object
    implements Callback, Serializable
    This RedirectCallback class implements Callback and is used by the authentication module when redirect to a particulat URL is required with specific redirect data.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String FAILED
      The status as the result of redirection, as "FAILED".
      static String SUCCESS
      The status as the result of redirection, as "SUCCESS".
    • Constructor Summary

      Constructors 
      Constructor Description
      RedirectCallback()
      Constructs a RedirectCallback object.
      RedirectCallback​(String redirectUrl, Map redirectData, String method)
      Constructs a RedirectCallback object with redirect URL,redirect data and redirect method.
      RedirectCallback​(String redirectUrl, Map redirectData, String method, String statusParameter, String redirectBackUrlCookie)
      Constructs a RedirectCallback object with redirect URL,redirect data,redirect method,status parameter and redirect back URL Cookie name.
    • Constructor Detail

      • RedirectCallback

        public RedirectCallback()
        Constructs a RedirectCallback object.
      • RedirectCallback

        public RedirectCallback​(String redirectUrl,
                                Map redirectData,
                                String method)
        Constructs a RedirectCallback object 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 a RedirectCallback object 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.