|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.http.impl.auth.AuthSchemeBase
org.apache.http.impl.auth.RFC2617Scheme
org.apache.http.impl.auth.BasicScheme
@NotThreadSafe public class BasicScheme
Basic authentication scheme as defined in RFC 2617.
The following parameters can be used to customize the behavior of this class:
| Constructor Summary | |
|---|---|
BasicScheme()
Default constructor for the basic authentication scheme. |
|
| Method Summary | |
|---|---|
Header |
authenticate(Credentials credentials,
HttpRequest request)
Produces basic authorization header for the given set of Credentials. |
static Header |
authenticate(Credentials credentials,
String charset,
boolean proxy)
Returns a basic Authorization header value for the given Credentials and charset. |
String |
getSchemeName()
Returns textual designation of the basic authentication scheme. |
boolean |
isComplete()
Tests if the Basic authentication process has been completed. |
boolean |
isConnectionBased()
Returns false. |
void |
processChallenge(Header header)
Processes the Basic challenge. |
| Methods inherited from class org.apache.http.impl.auth.RFC2617Scheme |
|---|
getParameter, getParameters, getRealm, parseChallenge |
| Methods inherited from class org.apache.http.impl.auth.AuthSchemeBase |
|---|
isProxy, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BasicScheme()
| Method Detail |
|---|
public String getSchemeName()
basic
public void processChallenge(Header header)
throws MalformedChallengeException
processChallenge in interface AuthSchemeprocessChallenge in class AuthSchemeBaseheader - the challenge header
MalformedChallengeException - is thrown if the authentication challenge
is malformedpublic boolean isComplete()
public boolean isConnectionBased()
public Header authenticate(Credentials credentials,
HttpRequest request)
throws AuthenticationException
Credentials.
credentials - The set of credentials to be used for authenticationrequest - The request being authenticated
InvalidCredentialsException - if authentication credentials are not
valid or not applicable for this authentication scheme
AuthenticationException - if authorization string cannot
be generated due to an authentication failure
public static Header authenticate(Credentials credentials,
String charset,
boolean proxy)
Credentials and charset.
credentials - The credentials to encode.charset - The charset to use for encoding the credentials
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||