com.ibm.workflow.portlet.sample
Class BasicAuthenticationHandler

java.lang.Object
  |
  +--com.ibm.workflow.portlet.client.GenericCommandHandler
        |
        +--com.ibm.workflow.portlet.sample.BasicAuthenticationHandler
All Implemented Interfaces:
CommandHandler

public class BasicAuthenticationHandler
extends GenericCommandHandler

This CommandHandler extracts the HTTP/1.1 Basic Authentication header from a request and uses it to logon on to IBM WebSphere MQ Workflow, if present. It can also create credentials for Servlet V2.2 form based authentication.

Since no user ID mapping currently is performed, the user ID in the Authentication header must be a valid Workflow user ID.

For details on how to run this sample, see the Samples section.


Constructor Summary
BasicAuthenticationHandler()
           
 
Method Summary
 byte[] getCredentials(javax.servlet.http.HttpServletRequest request)
          Checks if the request contains HTTP/1.1 Basic Authentication credentials.
 java.lang.String getHandlerInfo()
          Returns information about the handler, such as author, version, and copyright.
 
Methods inherited from class com.ibm.workflow.portlet.client.GenericCommandHandler
destroy, execute, getConfig, getContext, getSessionContext, getTriggerTagFor, init, onLogoff, onLogon
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicAuthenticationHandler

public BasicAuthenticationHandler()
Method Detail

getHandlerInfo

public java.lang.String getHandlerInfo()
Returns information about the handler, such as author, version, and copyright.
Overrides:
getHandlerInfo in class GenericCommandHandler
Returns:
a String containing handler information

getCredentials

public byte[] getCredentials(javax.servlet.http.HttpServletRequest request)
                      throws ClientException
Checks if the request contains HTTP/1.1 Basic Authentication credentials. If so, they are used for the authenication exit, that is, the request parameters (userID, ...) passed to the BuiltinHandler.logon() command will be ignored.
Overrides:
getCredentials in class GenericCommandHandler
Parameters:
request - The logon request sent by the client
Returns:
null if no Authentication Header is present. If the the Authentication header is present, the ExecutionService.logon4() method will be called and an authentication exit must have been installed on the Workflow server.
Throws:
ClientException - If an error occurred.


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