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

Class AuthenticationUtil

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

  1. public class AuthenticationUtil
  2. 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

Constructor and Description
AuthenticationUtil()

Method Summary

Modifier and Type Method and Description
  1. static
  2. boolean
credentialsRequired(javax.servlet.ServletRequest request)
Returns true if credentials are required.
  1. static
  2. javax.servlet.http.HttpServletRequest
getHttpServletRequest(javax.servlet.ServletRequest servletRequest)
Check instanceof HttpServletRequest on servletRequest, and cast it if true.
  1. static
  2. javax.servlet.http.HttpServletResponse
getHttpServletResponse(javax.servlet.ServletResponse servletResponse)
Check instanceof HttpServletResponse on servletResponse, and cast it if true.
  1. static
  2. java.lang.String
pushRequestParameters(javax.servlet.ServletRequest servletRequest)
Push request parameters.
  1. static
  2. 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

  1. public AuthenticationUtil()

Method Detail

credentialsRequired

  1. 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

  1. public static void setCredentials( javax.servlet.ServletRequest request,
  2. java.lang.String userId,
  3. java.lang.String password,
  4. java.lang.String userPrincipalName,
  5. java.util.Map extraParameters,
  6. boolean encrypt)
  7. 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

  1. 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

  1. 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

  1. 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.