Package org.apache.http.impl.auth
Class RFC2617Scheme
- java.lang.Object
-
- org.apache.http.impl.auth.AuthSchemeBase
-
- org.apache.http.impl.auth.RFC2617Scheme
-
- All Implemented Interfaces:
java.io.Serializable,AuthScheme,ContextAwareAuthScheme
- Direct Known Subclasses:
BasicScheme,DigestScheme
public abstract class RFC2617Scheme extends AuthSchemeBase implements java.io.Serializable
Abstract authentication scheme class that lays foundation for all RFC 2617 compliant authentication schemes and provides capabilities common to all authentication schemes defined in RFC 2617.- Since:
- 4.0
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.nio.charset.CharsetcredentialsCharsetprivate java.util.Map<java.lang.String,java.lang.String>paramsprivate static longserialVersionUID-
Fields inherited from class org.apache.http.impl.auth.AuthSchemeBase
challengeState
-
-
Constructor Summary
Constructors Constructor Description RFC2617Scheme()RFC2617Scheme(java.nio.charset.Charset credentialsCharset)RFC2617Scheme(ChallengeState challengeState)Deprecated.(4.3) do not use.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.charset.CharsetgetCredentialsCharset()(package private) java.lang.StringgetCredentialsCharset(org.apache.http.HttpRequest request)java.lang.StringgetParameter(java.lang.String name)Returns authentication parameter with the given name, if available.protected java.util.Map<java.lang.String,java.lang.String>getParameters()Returns authentication parameters map.java.lang.StringgetRealm()Returns authentication realm.protected voidparseChallenge(org.apache.http.util.CharArrayBuffer buffer, int pos, int len)private voidreadObject(java.io.ObjectInputStream in)private voidreadObjectNoData()private voidwriteObject(java.io.ObjectOutputStream out)-
Methods inherited from class org.apache.http.impl.auth.AuthSchemeBase
authenticate, getChallengeState, isProxy, processChallenge, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.http.auth.AuthScheme
authenticate, getSchemeName, isComplete, isConnectionBased
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
params
private final java.util.Map<java.lang.String,java.lang.String> params
-
credentialsCharset
private transient java.nio.charset.Charset credentialsCharset
-
-
Constructor Detail
-
RFC2617Scheme
@Deprecated public RFC2617Scheme(ChallengeState challengeState)
Deprecated.(4.3) do not use.Creates an instance ofRFC2617Schemewith the given challenge state.- Since:
- 4.2
-
RFC2617Scheme
public RFC2617Scheme(java.nio.charset.Charset credentialsCharset)
- Since:
- 4.3
-
RFC2617Scheme
public RFC2617Scheme()
-
-
Method Detail
-
getCredentialsCharset
public java.nio.charset.Charset getCredentialsCharset()
- Since:
- 4.3
-
getCredentialsCharset
java.lang.String getCredentialsCharset(org.apache.http.HttpRequest request)
-
parseChallenge
protected void parseChallenge(org.apache.http.util.CharArrayBuffer buffer, int pos, int len) throws MalformedChallengeException- Specified by:
parseChallengein classAuthSchemeBase- Throws:
MalformedChallengeException
-
getParameters
protected java.util.Map<java.lang.String,java.lang.String> 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:
getParameterin interfaceAuthScheme- 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:
getRealmin interfaceAuthScheme- Returns:
- the authentication realm
-
writeObject
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException- Throws:
java.io.IOException
-
readObject
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
readObjectNoData
private void readObjectNoData() throws java.io.ObjectStreamException- Throws:
java.io.ObjectStreamException
-
-