org.apache.commons.httpclient.auth
public class BasicScheme extends RFC2617Scheme
Basic authentication scheme as defined in RFC 2617.
Constructor Summary | |
---|---|
BasicScheme()
Default constructor for the basic authetication scheme.
| |
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
{@link Credentials}.
|
String | authenticate(Credentials credentials, HttpMethod method)
Produces basic authorization string for the given set of {@link Credentials}.
|
static String | authenticate(UsernamePasswordCredentials credentials) |
static String | authenticate(UsernamePasswordCredentials credentials, String charset)
Returns a basic Authorization header value for the given
{@link 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.
|
Since: 3.0
Deprecated: Use parameterless constructor and {@link AuthScheme#processChallenge(String)} method
Constructor for the basic authetication scheme.Parameters: challenge authentication challenge
Throws: MalformedChallengeException is thrown if the authentication challenge is malformed
Deprecated: Use {@link #authenticate(Credentials, HttpMethod)}
Produces basic authorization string for the given set of {@link Credentials}.Parameters: credentials The set of credentials to be used for athentication method Method name is ignored by the basic authentication scheme uri URI is ignored by the basic authentication scheme
Returns: a basic authorization string
Throws: 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
Parameters: credentials The set of credentials to be used for athentication method The method being authenticated
Returns: a basic authorization string
Throws: 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
Since: 3.0
Deprecated: Use {@link #authenticate(UsernamePasswordCredentials, String)} Returns a basic Authorization header value for the given {@link UsernamePasswordCredentials}.
Parameters: credentials The credentials to encode.
Returns: a basic authorization string
Parameters: credentials The credentials to encode. charset The charset to use for encoding the credentials
Returns: a basic authorization string
Since: 3.0
Returns: basic
Returns: true if Basic authorization has been processed, false otherwise.
Since: 3.0
Returns: false.
Since: 3.0
Parameters: challenge the challenge string
Throws: MalformedChallengeException is thrown if the authentication challenge is malformed
Since: 3.0