|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.commons.httpclient.auth.RFC2617Scheme | +--org.apache.commons.httpclient.auth.BasicScheme
Basic authentication scheme as defined in RFC 2617.
Constructor Summary | |
BasicScheme()
Default constructor for the basic authetication scheme. |
|
BasicScheme(String challenge)
Deprecated. Use parameterless constructor and AuthScheme.processChallenge(String)
method |
Method Summary | |
String |
authenticate(Credentials credentials,
HttpMethod method)
Produces basic authorization string for the given set of Credentials . |
String |
authenticate(Credentials credentials,
String method,
String uri)
Deprecated. Use authenticate(Credentials, HttpMethod) |
static String |
authenticate(UsernamePasswordCredentials credentials)
Deprecated. Use authenticate(UsernamePasswordCredentials, String)
Returns a basic Authorization header value for the given
UsernamePasswordCredentials . |
static String |
authenticate(UsernamePasswordCredentials credentials,
String charset)
Returns a basic Authorization header value for the given UsernamePasswordCredentials 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(String challenge)
Processes the Basic challenge. |
Methods inherited from class org.apache.commons.httpclient.auth.RFC2617Scheme |
getID, getParameter, getParameters, getRealm |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BasicScheme()
public BasicScheme(String challenge) throws MalformedChallengeException
AuthScheme.processChallenge(String)
method
challenge
- authentication challengeMalformedChallengeException
- is thrown if the authentication challenge
is malformedMethod Detail |
public String getSchemeName()
basic
public void processChallenge(String challenge) throws MalformedChallengeException
processChallenge
in class RFC2617Scheme
challenge
- the challenge stringMalformedChallengeException
- is thrown if the authentication challenge
is malformedpublic boolean isComplete()
public String authenticate(Credentials credentials, String method, String uri) throws AuthenticationException
authenticate(Credentials, HttpMethod)
Credentials
.credentials
- The set of credentials to be used for athenticationmethod
- Method name is ignored by the basic authentication schemeuri
- URI is ignored by the basic authentication schemeInvalidCredentialsException
- if authentication credentials
are not valid or not applicable for this authentication schemeAuthenticationException
- if authorization string cannot
be generated due to an authentication failurepublic boolean isConnectionBased()
public String authenticate(Credentials credentials, HttpMethod method) throws AuthenticationException
Credentials
.credentials
- The set of credentials to be used for athenticationmethod
- The method being authenticatedInvalidCredentialsException
- if authentication credentials
are not valid or not applicable for this authentication schemeAuthenticationException
- if authorization string cannot
be generated due to an authentication failurepublic static String authenticate(UsernamePasswordCredentials credentials)
authenticate(UsernamePasswordCredentials, String)
Returns a basic Authorization header value for the given
UsernamePasswordCredentials
.
credentials
- The credentials to encode.public static String authenticate(UsernamePasswordCredentials credentials, String charset)
UsernamePasswordCredentials
and charset.credentials
- The credentials to encode.charset
- The charset to use for encoding the credentials
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |