|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.commons.httpclient.auth.AuthSchemeBase | +--org.apache.commons.httpclient.auth.RFC2617Scheme | +--org.apache.commons.httpclient.auth.BasicScheme
Basic authentication scheme as defined in RFC 2617.
Constructor Summary | |
---|---|
BasicScheme(java.lang.String challenge)
Constructor for the basic authetication scheme. |
Method Summary | |
---|---|
java.lang.String |
authenticate(Credentials credentials,
java.lang.String method,
java.lang.String uri)
Produces basic authorization string for the given set of Credentials . |
static java.lang.String |
authenticate(UsernamePasswordCredentials credentials)
Return a basic Authorization header value for the given UsernamePasswordCredentials . |
java.lang.String |
getSchemeName()
Returns textual designation of the basic authentication scheme. |
Methods inherited from class org.apache.commons.httpclient.auth.RFC2617Scheme |
---|
getID, getParameter, getParameters, getRealm |
Methods inherited from class org.apache.commons.httpclient.auth.AuthSchemeBase |
---|
equals, hashCode, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public BasicScheme(java.lang.String challenge) throws MalformedChallengeException
challenge
- authentication challenge
MalformedChallengeException
- is thrown if the authentication challenge
is malformedMethod Detail |
public java.lang.String getSchemeName()
basic
public java.lang.String authenticate(Credentials credentials, java.lang.String method, java.lang.String uri) throws AuthenticationException
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 scheme
AuthenticationException
- if authorization string cannot
be generated due to an authentication failureHttpMethod.getName()
,
HttpMethod.getPath()
public static java.lang.String authenticate(UsernamePasswordCredentials credentials)
UsernamePasswordCredentials
.
credentials
- The credentials to encode.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |