Skip navigation links

Oracle Application Server HTTPClient Java API Reference
10g Release 3 (10.1.3.1.0)

B32117-01


HTTPClient
Interface AuthenticationScheme

All Known Implementing Classes:
AuthenticationSchemeBase

public interface AuthenticationScheme

The AuthenticationScheme interface provides access to specific authentication schemes supported by HTTPClient. AuthenticationSchemes are registered in the AuthenticationSchemeRegistry, and handle messages sent during request and response processing.


Field Summary
static boolean IS_CONNECTION_ORIENTED
          Useful Constant for specifying whether a scheme is connection oriented.

 

Method Summary
 AuthorizationInfo createAuthorizationInfo(java.lang.String host, int port, java.lang.String realm, java.lang.String username, java.lang.String password)
          Creates an AuthorizationInfo object, appropriately populated for use by this AuthenticationScheme.
 AuthorizationInfo getAuthorization(AuthorizationInfo credentials, RoRequest request, AuthorizationInfo challenge, RoResponse response)
          Determines an AuthorizationInfo object for populating either the Authorization header or the Proxy-Authorization header, appropriately for the scheme.
 java.lang.String getSchemeName()
          Determines the name of the scheme.
 boolean isConnectionOriented()
          Determines whether the scheme is connection oriented.
 java.lang.String setSchemeName(java.lang.String schemeName)
          Specifies the name of the scheme.

 

Field Detail

IS_CONNECTION_ORIENTED

public static final boolean IS_CONNECTION_ORIENTED
Useful Constant for specifying whether a scheme is connection oriented.
See Also:
Constant Field Values

Method Detail

getSchemeName

public java.lang.String getSchemeName()
Determines the name of the scheme.
Returns:
The name of the scheme.

createAuthorizationInfo

public AuthorizationInfo createAuthorizationInfo(java.lang.String host,
                                                 int port,
                                                 java.lang.String realm,
                                                 java.lang.String username,
                                                 java.lang.String password)
                                          throws java.lang.IllegalArgumentException
Creates an AuthorizationInfo object, appropriately populated for use by this AuthenticationScheme. The resulting object will be passed back to getAuthorization(HTTPClient.AuthorizationInfo, HTTPClient.RoRequest, HTTPClient.AuthorizationInfo, HTTPClient.RoResponse) when we are challenged by the server using this scheme.
Parameters:
host - Connecting to this host
port - Connecting on this port
realm - Applicable security realm
username - Account username
password - Account password
Returns:
The new AuthorizationInfo object
Throws:
java.lang.IllegalArgumentException - Invalid arguments given.

getAuthorization

public AuthorizationInfo getAuthorization(AuthorizationInfo credentials,
                                          RoRequest request,
                                          AuthorizationInfo challenge,
                                          RoResponse response)
Determines an AuthorizationInfo object for populating either the Authorization header or the Proxy-Authorization header, appropriately for the scheme.
Parameters:
credentials - Contains credentials populated as required by this AuthenticationScheme, usually by createAuthorizationInfo(java.lang.String, int, java.lang.String, java.lang.String, java.lang.String).
request - The original request
challenge - The server challenge, parsed from the response, or null if attempting to pre-emptively send auth info.
response - The response received, which contains the challenge, or null if attempting to pre-emptively send auth info.
Returns:
The AuthorizationInfo object for populating either the Authorization header or the Proxy-Authorization header, or null if header values could not be determined.

isConnectionOriented

public boolean isConnectionOriented()
Determines whether the scheme is connection oriented.
Returns:
true if scheme is connection oriented, otherwise false.

setSchemeName

public java.lang.String setSchemeName(java.lang.String schemeName)
Specifies the name of the scheme.
Parameters:
schemeName - The name of the scheme.
Returns:
The previous scheme name

Skip navigation links

Oracle Application Server HTTPClient Java API Reference
10g Release 3 (10.1.3.1.0)

B32117-01


Copyright © 2004, 2006, Oracle. All rights reserved.