electric.http.authentication.digest
Class DigestAuthSession
java.lang.Object
  
electric.http.authentication.digest.DigestAuthSession
- All Implemented Interfaces: 
 - IAuthSession, IEXMLLoggingConstants, IGLUELoggingConstants, IHTTPConstants, ILoggingConstants
 
- public class DigestAuthSession
- extends java.lang.Object
- implements IAuthSession, IHTTPConstants, IGLUELoggingConstants
   
Provide HTTP Digest authentication service.
- Author:
 
  - webMethods
 
 
| Fields inherited from interface electric.util.http.IHTTPConstants | 
ACCEPT_LANGUAGE, ACCEPT_RANGES, APPLICATION_BINARY, APPLICATION_OCTET_STREAM, ASCII, AUTHORIZATION, BASIC, BOUNDARY, CHARSET_EQUALS, CHUNKED, CLOSE, COLON_SLASH_SLASH, CONNECT, CONNECTION, CONTENT_ID, CONTENT_LANGUAGE, CONTENT_LENGTH, CONTENT_LOCATION, CONTENT_TYPE, CONTINUATION_STATUS, CONTINUE_EXPECTATION, COOKIE, COOKIE_LISTENER, DATE, DEFAULT_CONTENT_TYPE, DEFAULT_HTTP_CHARSET, DEFAULT_HTTPS_PORT, DEFAULT_MIME_TYPE, DEFAULT_PROXY_PORT, DIGEST, EOL, EXPECT, EXPECT_HEADER, FORM_URLENCODED, GET, GLUE_SESSION, HEAD, HOST, HTTP_1_0, HTTP_1_1, HTTP_PROTOCOL, HTTPS_PROTOCOL, IF_MODIFIED_SINCE, KEEP_ALIVE, LAST_MODIFIED, LOCATION, MD5_HASH, MIME_BOUNDARY, MIME_VERSION, MULTIPART_CONTENT_TYPE, OK, POST, PROXY_AUTHORIZATION, RANGE, SC_CONTINUE, SC_MOVED, SC_MOVED_PERMANENTLY, SC_OK, SC_PROXY_AUTHENTICATION_REQUIRED, SC_UNAUTHORIZED, SEPARATOR, SERVER, SERVER_PREFIX, SERVER_TYPE, SET_COOKIE_0, SET_COOKIE_1, SLASH, START, TEXT_HTML, TEXT_PLAIN, TEXT_XML, TEXT_XML_UTF_8, TRANSFER_ENCODING, USER_AGENT, WWW_AUTHENTICATE | 
 
| Fields inherited from interface electric.glue.IGLUELoggingConstants | 
CLUSTER_DEBUG_EVENT, CLUSTER_EVENT, CONSOLE_DEBUG_EVENT, DEPLOY_EVENT, DETECTORS_EVENT, HTTP_EVENT, JMS_EVENT, REBINDING_EVENT, SECURITY_DEBUG_EVENT, SECURITY_DETAIL_EVENT, SERVLET_EVENT, SOAP_EVENT | 
 
 
| Fields inherited from interface electric.util.log.ILoggingConstants | 
CLASSLOADER_EVENT, COMMAND_EVENT, COMMENT_EVENT, CONFIG_EVENT, DEBUG_EVENT, ELECTRIC_LOGGING_PROPERTY, ERROR_EVENT, EXCEPTION_EVENT, FILE_EVENT, LICENSE_EVENT, RESOURCES_EVENT, SECURITY_EVENT, SHUTDOWN_EVENT, SOURCE_EVENT, SQL_EVENT, STARTUP_EVENT, WARNING_EVENT | 
 
 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
DigestAuthSession
public DigestAuthSession()
getCredentials
public PasswordCredentials getCredentials()
- Specified by:
 getCredentials in interface IAuthSession
 
- Returns:
 - credentials for this session.
 
 
setCredentials
public void setCredentials(PasswordCredentials credentials)
- Description copied from interface: 
IAuthSession 
- Users specify credentials as user names and passwords. The
 AuthSession will convert them into the appropriate format for
 authenticating to the server.
- Specified by:
 setCredentials in interface IAuthSession
 
- Parameters:
 credentials - 
 
 
parseAuthHeader
public AuthHeaderData parseAuthHeader(java.lang.String header)
- Parse a WWW-Authenticate header. Not all fields will be present
 in all headers. See rfc2617 3.2.1 for details.
- Specified by:
 parseAuthHeader in interface IAuthSession
 
- Parameters:
 header - The WWW-Authenticate header
 
 
authenticateRealm
public boolean authenticateRealm(XURL host,
                                 OutboundHTTPRequest request,
                                 AuthHeaderData headerAuthData)
                          throws java.lang.SecurityException
- Description copied from interface: 
IAuthSession 
- Given the data from a WWW-Authenticate challenge header, plus
 locally maintained state, calculate the appropriate response and
 add it to the outgoing request. The authenticator must update the
 copy of authData in authSession to match the options chosen from
 those presented in authData. Return true if the caller should
 retry the request if this request fails, false otherwise. (No
 point in retrying Basic, but Digest may return new information in
 the next 401)
- Specified by:
 authenticateRealm in interface IAuthSession
 
- Parameters:
 host - request - headerAuthData - 
- Throws:
 java.lang.SecurityException
 
 
preAuthenticate
public void preAuthenticate(XURL host,
                            OutboundHTTPRequest request)
- If we have enough information to add an authentication header,
 then add it. (Some schemes, like BASIC, allow speculative
 authentication before a 401 is received)
- Specified by:
 preAuthenticate in interface IAuthSession
 
- Parameters:
 host - request - 
 
 
copyright© 2001-2004 by webMethods All Rights Reserved.