com.ibm.workflow.servlet.sample
Class BasicAuthenticationHandler
java.lang.Object
|
+--com.ibm.workflow.servlet.client.GenericCommandHandler
|
+--com.ibm.workflow.servlet.sample.BasicAuthenticationHandler
- public class BasicAuthenticationHandler
- extends GenericCommandHandler
This CommandHandler extracts the HTTP/1.1 Authentication header
from a request and uses it to logon on to MQSeries Workflow, if present.
Since no user ID mapping currently is performed, the user ID in the
Authentication header must be a valid Workflow user ID. When running this
sample with MQSeries Workflow releases prior to V3.3, the password in the
header must also match the Workflow password for that user.
This handler also creates credentials for Servlet V2.2 form based
authentication. When using MQWF V3.2, the password is assumed to be
'password' (see getCredentials(javax.servlet.http.HttpServletRequest)
below.
For details on how to run this sample, see the
Samples section.
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. |
void |
logon3(ExecutionService service,
byte[] credentials,
SessionMode mode,
AbsenceIndicator absenceIndicator)
Deprecated. This method will no longer be called when using MQSeries
Workflow V3.3 which provides an authentication exit for
the Administration server. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
BasicAuthenticationHandler
public BasicAuthenticationHandler()
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 logon3()
method will be called by BuiltinHandler
. For MQSeries
Workflow V3.3 and subsequent release levels, 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.
logon3
public void logon3(ExecutionService service,
byte[] credentials,
SessionMode mode,
AbsenceIndicator absenceIndicator)
throws FmcException
- Deprecated. This method will no longer be called when using MQSeries
Workflow V3.3 which provides an authentication exit for
the Administration server.
- This method interprets the credentials passed as a colon-separated
(
userID
, password
) pair. These values are
extracted and then used to logon to Workflow through
ExeuctionService.logon2
.
- Overrides:
- logon3 in class GenericCommandHandler
- Parameters:
service
- The service to log on tocredentials
- The credentials returned by
getCredentials()
mode
- See ExecutionService.logon2()
absenceIndicator
- See ExecutionService.logon2()
- Throws:
- FmcException - If an error occurred.
© Copyright IBM Corporation 1999, 2001. All Rights Reserved.