|
||||||||||
| 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
public class BasicScheme
Basic authentication scheme as defined in RFC 2617.
| Field Summary |
|---|
| Fields inherited from class org.apache.http.impl.auth.AuthSchemeBase |
|---|
challengeState |
| Constructor Summary | |
|---|---|
BasicScheme()
|
|
BasicScheme(ChallengeState challengeState)
Deprecated. (4.3) do not use. |
|
BasicScheme(Charset credentialsCharset)
|
|
| Method Summary | |
|---|---|
org.apache.http.Header |
authenticate(Credentials credentials,
org.apache.http.HttpRequest request)
Deprecated. (4.2) Use ContextAwareAuthScheme.authenticate(
Credentials, HttpRequest, org.apache.http.protocol.HttpContext) |
org.apache.http.Header |
authenticate(Credentials credentials,
org.apache.http.HttpRequest request,
org.apache.http.protocol.HttpContext context)
Produces basic authorization header for the given set of Credentials. |
static org.apache.http.Header |
authenticate(Credentials credentials,
String charset,
boolean proxy)
Deprecated. (4.3) use authenticate(Credentials, HttpRequest, HttpContext). |
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(org.apache.http.Header header)
Processes the Basic challenge. |
String |
toString()
|
| Methods inherited from class org.apache.http.impl.auth.RFC2617Scheme |
|---|
getCredentialsCharset, getParameter, getParameters, getRealm, parseChallenge |
| Methods inherited from class org.apache.http.impl.auth.AuthSchemeBase |
|---|
getChallengeState, isProxy |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BasicScheme(Charset credentialsCharset)
@Deprecated public BasicScheme(ChallengeState challengeState)
BasicScheme with the given challenge
state.
public BasicScheme()
| Method Detail |
|---|
public String getSchemeName()
basic
public void processChallenge(org.apache.http.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()
true if Basic authorization has been processed,
false otherwise.public boolean isConnectionBased()
false. Basic authentication scheme is request based.
false.
@Deprecated
public org.apache.http.Header authenticate(Credentials credentials,
org.apache.http.HttpRequest request)
throws AuthenticationException
ContextAwareAuthScheme.authenticate(
Credentials, HttpRequest, org.apache.http.protocol.HttpContext)
AuthSchemeCredentials.
credentials - The set of credentials to be used for athenticationrequest - The request being authenticated
AuthenticationException - if authorization string cannot
be generated due to an authentication failure
public org.apache.http.Header authenticate(Credentials credentials,
org.apache.http.HttpRequest request,
org.apache.http.protocol.HttpContext context)
throws AuthenticationException
Credentials.
authenticate in interface ContextAwareAuthSchemeauthenticate in class AuthSchemeBasecredentials - The set of credentials to be used for authenticationrequest - The request being authenticatedcontext - HTTP context
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
@Deprecated
public static org.apache.http.Header authenticate(Credentials credentials,
String charset,
boolean proxy)
authenticate(Credentials, HttpRequest, HttpContext).
Authorization header value for the given
Credentials and charset.
credentials - The credentials to encode.charset - The charset to use for encoding the credentials
public String toString()
toString in class AuthSchemeBase
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||