org.apache.commons.httpclient.auth
public abstract class AuthPolicy extends Object
The following specifications are provided:
Since: 3.0
Version: $Revision: 480424 $
Field Summary | |
---|---|
static String | AUTH_SCHEME_PRIORITY
The key used to look up the list of IDs of supported
authentication schemes in their order of preference. |
static String | BASIC
Basic authentication scheme as defined in RFC2617 (considered inherently
insecure, but most widely supported) |
static String | DIGEST
Digest authentication scheme as defined in RFC2617. |
protected static Log | LOG Log object. |
static String | NTLM
The NTLM scheme is a proprietary Microsoft Windows Authentication
protocol (considered to be the most secure among currently supported
authentication schemes). |
Method Summary | |
---|---|
static AuthScheme | getAuthScheme(String id)
Gets the authentication scheme with the given ID.
|
static List | getDefaultAuthPrefs()
Returns a list containing all registered authentication
schemes in their default order.
|
static void | registerAuthScheme(String id, Class clazz)
Registers a class implementing an authentication scheme with
the given identifier. |
static void | unregisterAuthScheme(String id)
Unregisters the class implementing an authentication scheme with
the given ID.
|
authentication schemes
in their order of preference. The scheme IDs are
stored in a java.util.Collection as java.lang.Strings.
If several schemes are returned in the WWW-Authenticate
or Proxy-Authenticate header, this parameter defines which
authentication schemes
takes precedence over others.
The first item in the collection represents the most preferred
authentication scheme
, the last item represents the ID
of the least preferred one.
See Also: DefaultHttpParams
authentication scheme
with the given ID.
Parameters: id the authentication scheme
ID
Returns: authentication scheme
Throws: IllegalStateException if a scheme with the ID cannot be found
authentication
schemes
in their default order.
Returns: authentication scheme
authentication scheme
with
the given identifier. If a class with the given ID already exists it will be overridden.
This ID is the same one used to retrieve the authentication scheme
from getAuthScheme.
Please note that custom authentication preferences, if used, need to be updated accordingly
for the new authentication scheme
to take effect.
Parameters: id the identifier for this scheme clazz the class to register
See Also: getAuthScheme AUTH_SCHEME_PRIORITY
authentication scheme
with
the given ID.
Parameters: id the ID of the class to unregister