|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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(String challenge)
Constructor for the basic authetication scheme. |
Method Summary | |
String |
authenticate(Credentials credentials,
String method,
String uri)
Produces basic authorization string for the given set of Credentials . |
static String |
authenticate(UsernamePasswordCredentials credentials)
Return a basic Authorization header value for the given UsernamePasswordCredentials . |
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(String challenge) throws MalformedChallengeException
challenge
- authentication challenge
MalformedChallengeException
- is thrown if the authentication challenge
is malformedMethod Detail |
public String getSchemeName()
basic
public String authenticate(Credentials credentials, String method, 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 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 |