Class AuthPolicy
java.lang.Object
edu.internet2.middleware.grouperClientExt.org.apache.commons.httpclient.auth.AuthPolicy
Authentication policy class. The Authentication policy provides corresponding
authentication scheme interfrace for a given type of authorization challenge.
The following specifications are provided:
- Basic: Basic authentication scheme as defined in RFC2617 (considered inherently insecure, but most widely supported)
- Digest: Digest authentication scheme as defined in RFC2617
- NTLM: The NTLM scheme is a proprietary Microsoft Windows Authentication protocol (considered to be the most secure among currently supported authentication schemes)
- Since:
- 3.0
- Version:
- $Revision: 480424 $
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The key used to look up the list of IDs of supportedauthentication schemes
in their order of preference.static final String
Basic authentication scheme as defined in RFC2617 (considered inherently insecure, but most widely supported)static final String
Digest authentication scheme as defined in RFC2617.protected static final Log
Log object.static final String
The NTLM scheme is a proprietary Microsoft Windows Authentication protocol (considered to be the most secure among currently supported authentication schemes). -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic AuthScheme
getAuthScheme
(String id) Gets theauthentication scheme
with the given ID.static List
Returns a list containing all registeredauthentication schemes
in their default order.static void
registerAuthScheme
(String id, Class clazz) Registers a class implementing anauthentication scheme
with the given identifier.static void
Unregisters the class implementing anauthentication scheme
with the given ID.
-
Field Details
-
AUTH_SCHEME_PRIORITY
The key used to look up the list of IDs of supportedauthentication schemes
in their order of preference. The scheme IDs are stored in aCollection
asString
s.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 preferredauthentication scheme
, the last item represents the ID of the least preferred one.- See Also:
-
NTLM
The NTLM scheme is a proprietary Microsoft Windows Authentication protocol (considered to be the most secure among currently supported authentication schemes).- See Also:
-
DIGEST
Digest authentication scheme as defined in RFC2617.- See Also:
-
BASIC
Basic authentication scheme as defined in RFC2617 (considered inherently insecure, but most widely supported)- See Also:
-
LOG
Log object.
-
-
Constructor Details
-
AuthPolicy
public AuthPolicy()
-
-
Method Details
-
registerAuthScheme
Registers a class implementing anauthentication 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 theauthentication scheme
fromgetAuthScheme(String)
.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 schemeclazz
- the class to register- See Also:
-
unregisterAuthScheme
Unregisters the class implementing anauthentication scheme
with the given ID.- Parameters:
id
- the ID of the class to unregister
-
getAuthScheme
Gets theauthentication scheme
with the given ID.- Parameters:
id
- theauthentication scheme
ID- Returns:
authentication scheme
- Throws:
IllegalStateException
- if a scheme with the ID cannot be found
-
getDefaultAuthPrefs
Returns a list containing all registeredauthentication schemes
in their default order.- Returns:
authentication scheme
-