com.filenet.ae.toolkit.server.util.credentials
Class AuthenticationUtil

java.lang.Object
  extended bycom.filenet.ae.toolkit.server.util.credentials.AuthenticationUtil

public class AuthenticationUtil
extends java.lang.Object

This is the authentication filter helper API. For use when developing a custom single signon authentication filter. A custom authentication filter must check for whether or not credentials are required, and process only if this flag returns true. The processing in a custom authentication filter must call the setCredentials method of this API upon completion, passing valid userId and password values that will be used by the application.


Constructor Summary
AuthenticationUtil()
           
 
Method Summary
static boolean credentialsRequired(javax.servlet.ServletRequest request)
          Returns true if credentials are required.
static javax.servlet.http.HttpServletRequest getHttpServletRequest(javax.servlet.ServletRequest servletRequest)
          Check instanceof HttpServletRequest on servletRequest, and cast it if true.
static javax.servlet.http.HttpServletResponse getHttpServletResponse(javax.servlet.ServletResponse servletResponse)
          Check instanceof HttpServletResponse on servletResponse, and cast it if true.
static java.lang.String pushRequestParameters(javax.servlet.ServletRequest servletRequest)
          Push request parameters.
static void setCredentials(javax.servlet.ServletRequest request, java.lang.String userId, java.lang.String password, java.lang.String userPrincipalName, java.util.Map extraParameters, boolean encrypt)
          An SSO filter that is providing credentials must call this method to pass credentials when credentialsRequired has returned true.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthenticationUtil

public AuthenticationUtil()
Method Detail

credentialsRequired

public static boolean credentialsRequired(javax.servlet.ServletRequest request)
Returns true if credentials are required. In this case, the SSO filter must authenticated credentials, and pass them to the setCredentials method call. If this call returns false, the SSO filter must skip all processing.

Parameters:
request -
Returns:

setCredentials

public static void setCredentials(javax.servlet.ServletRequest request,
                                  java.lang.String userId,
                                  java.lang.String password,
                                  java.lang.String userPrincipalName,
                                  java.util.Map extraParameters,
                                  boolean encrypt)
                           throws java.io.IOException
An SSO filter that is providing credentials must call this method to pass credentials when credentialsRequired has returned true.

Parameters:
request -
userId -
password -
userPrincipalName - - This must uniquely identify the user.
extraParameters -
encrypt -
Throws:
java.io.IOException

getHttpServletRequest

public static javax.servlet.http.HttpServletRequest getHttpServletRequest(javax.servlet.ServletRequest servletRequest)
Check instanceof HttpServletRequest on servletRequest, and cast it if true. If not, return null.

Parameters:
servletRequest -
Returns:

getHttpServletResponse

public static javax.servlet.http.HttpServletResponse getHttpServletResponse(javax.servlet.ServletResponse servletResponse)
Check instanceof HttpServletResponse on servletResponse, and cast it if true. If not, return null.

Parameters:
servletResponse -
Returns:

pushRequestParameters

public static java.lang.String pushRequestParameters(javax.servlet.ServletRequest servletRequest)
Push request parameters. A custom SSO filter can make this call to store request parameters when presenting a challenge to the user will require breaking of the filter chain. If successful, this method will a returnUrl that will route the user back to their original request. Configuration of the AE PostprocessorFilter is required in order for this feature to function properly.

Parameters:
servletRequest -
Returns:
The return URL to redirect upon copletion of the credentials challenge. null if the request data could not be persisted.


© Copyright IBM Corp. 2002, 2007. All Rights Reserved.