org.apache.commons.httpclient.auth
Class RFC2617Scheme
java.lang.Object
org.apache.commons.httpclient.auth.RFC2617Scheme
- AuthScheme
public abstract class RFC2617Scheme
extends java.lang.Object
Abstract authentication scheme class that lays foundation for all
RFC 2617 compliant authetication schemes and provides capabilities common
to all authentication schemes defined in RFC 2617.
String | getID() - no longer used
|
String | getParameter(String name) - Returns authentication parameter with the given name, if available.
|
protected Map | getParameters() - Returns authentication parameters map.
|
String | getRealm() - Returns authentication realm.
|
void | processChallenge(String challenge) - Processes the given challenge token.
|
RFC2617Scheme
public RFC2617Scheme()
Default constructor for RFC2617 compliant authetication schemes.
getID
public String getID()
no longer used
Returns a String identifying the authentication challenge. This is
used, in combination with the host and port to determine if
authorization has already been attempted or not. Schemes which
require multiple requests to complete the authentication should
return a different value for each stage in the request.
Additionally, the ID should take into account any changes to the
authentication challenge and return a different value when appropriate.
For example when the realm changes in basic authentication it should be
considered a different authentication attempt and a different value should
be returned.
This method simply returns the realm for the challenge.
- getID in interface AuthScheme
- String a String identifying the authentication challenge. The
returned value may be null.
getParameter
public String getParameter(String name)
Returns authentication parameter with the given name, if available.
- getParameter in interface AuthScheme
name
- The name of the parameter to be returned
- the parameter with the given name
getParameters
protected Map getParameters()
Returns authentication parameters map. Keys in the map are lower-cased.
- the map of authentication parameters
getRealm
public String getRealm()
Returns authentication realm. The realm may not be null.
- getRealm in interface AuthScheme
processChallenge
public void processChallenge(String challenge)
throws MalformedChallengeException
Processes the given challenge token. Some authentication schemes
may involve multiple challenge-response exchanges. Such schemes must be able
to maintain the state information when dealing with sequential challenges
- processChallenge in interface AuthScheme
challenge
- the challenge string
Copyright (c) 1999-2005 - Apache Software Foundation