| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.httpclient.auth.AuthPolicy
public abstract class AuthPolicy
Authentication policy class. The Authentication policy provides corresponding authentication scheme interfrace for a given type of authorization challenge.
The following specifications are provided:
| Field Summary | |
|---|---|
| static String | AUTH_SCHEME_PRIORITYThe key used to look up the list of IDs of supported authentication schemesin their order of preference. | 
| static String | BASICBasic authentication scheme as defined in RFC2617 (considered inherently insecure, but most widely supported) | 
| static String | DIGESTDigest authentication scheme as defined in RFC2617. | 
| protected static Log | LOGLog object. | 
| static String | NTLMThe NTLM scheme is a proprietary Microsoft Windows Authentication protocol (considered to be the most secure among currently supported authentication schemes). | 
| Constructor Summary | |
|---|---|
| AuthPolicy() | |
| Method Summary | |
|---|---|
| static AuthScheme | getAuthScheme(String id)Gets the authentication schemewith the given ID. | 
| static List | getDefaultAuthPrefs()Returns a list containing all registered authentication 
 schemesin their default order. | 
| static void | registerAuthScheme(String id,
                   Class clazz)Registers a class implementing an authentication schemewith 
 the given identifier. | 
| static void | unregisterAuthScheme(String id)Unregisters the class implementing an authentication schemewith 
 the given ID. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final String AUTH_SCHEME_PRIORITY
authentication schemes in their order of preference. The scheme IDs are 
 stored in a Collection as 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.
 
DefaultHttpParams, 
Constant Field Valuespublic static final String NTLM
public static final String DIGEST
public static final String BASIC
protected static final Log LOG
| Constructor Detail | 
|---|
public AuthPolicy()
| Method Detail | 
|---|
public static void registerAuthScheme(String id,
                                      Class clazz)
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(String).
 
 
 Please note that custom authentication preferences, if used, need to be updated accordingly 
 for the new authentication scheme to take effect.
 
id - the identifier for this schemeclazz - the class to registergetAuthScheme(String), 
AUTH_SCHEME_PRIORITYpublic static void unregisterAuthScheme(String id)
authentication scheme with 
 the given ID.
id - the ID of the class to unregister
public static AuthScheme getAuthScheme(String id)
                                throws IllegalStateException
authentication scheme with the given ID.
id - the authentication scheme ID
authentication scheme
IllegalStateException - if a scheme with the ID cannot be foundpublic static List getDefaultAuthPrefs()
authentication 
 schemes in their default order.
authentication scheme| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||