org.apache.http.impl.auth
Class RFC2617Scheme

java.lang.Object
  extended by org.apache.http.impl.auth.RFC2617Scheme
All Implemented Interfaces:
AuthScheme
Direct Known Subclasses:
BasicScheme, DigestScheme

public abstract class RFC2617Scheme
extends java.lang.Object
implements AuthScheme

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.

Author:
Oleg Kalnichevski

Constructor Summary
RFC2617Scheme()
          Default constructor for RFC2617 compliant authetication schemes.
 
Method Summary
 java.lang.String getParameter(java.lang.String name)
          Returns authentication parameter with the given name, if available.
protected  java.util.Map getParameters()
          Returns authentication parameters map.
 java.lang.String getRealm()
          Returns authentication realm.
 boolean isProxy()
          Returns true if authenticating against a proxy, false otherwise.
 void processChallenge(org.apache.http.Header header)
          Processes the given challenge token.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.http.auth.AuthScheme
authenticate, getSchemeName, isComplete, isConnectionBased
 

Constructor Detail

RFC2617Scheme

public RFC2617Scheme()
Default constructor for RFC2617 compliant authetication schemes.

Method Detail

processChallenge

public void processChallenge(org.apache.http.Header header)
                      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

Specified by:
processChallenge in interface AuthScheme
Parameters:
header - the challenge header
Throws:
MalformedChallengeException - is thrown if the authentication challenge is malformed

getParameters

protected java.util.Map getParameters()
Returns authentication parameters map. Keys in the map are lower-cased.

Returns:
the map of authentication parameters

getParameter

public java.lang.String getParameter(java.lang.String name)
Returns authentication parameter with the given name, if available.

Specified by:
getParameter in interface AuthScheme
Parameters:
name - The name of the parameter to be returned
Returns:
the parameter with the given name

getRealm

public java.lang.String getRealm()
Returns authentication realm. The realm may not be null.

Specified by:
getRealm in interface AuthScheme
Returns:
the authentication realm

isProxy

public boolean isProxy()
Returns true if authenticating against a proxy, false otherwise.

Returns:
true if authenticating against a proxy, false otherwise


Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.