public interface AuthScheme
An authentication scheme should be able to support the following functions:
Authentication schemes may be stateful involving a series of challenge-response exchanges.
IMPORTANT: implementations of this interface MUST also implement ContextAwareAuthScheme
interface in order to remain API compatible with newer versions of HttpClient.
Modifier and Type | Method and Description |
---|---|
org.apache.http.Header |
authenticate(Credentials credentials,
org.apache.http.HttpRequest request)
|
String |
getParameter(String name)
Returns authentication parameter with the given name, if available.
|
String |
getRealm()
Returns authentication realm.
|
String |
getSchemeName()
Returns textual designation of the given authentication scheme.
|
boolean |
isComplete()
Authentication process may involve a series of challenge-response exchanges.
|
boolean |
isConnectionBased()
Tests if the authentication scheme is provides authorization on a per
connection basis instead of usual per request basis
|
void |
processChallenge(org.apache.http.Header header)
Processes the given challenge token.
|
void processChallenge(org.apache.http.Header header) throws MalformedChallengeException
header
- the challenge headerMalformedChallengeException
String getSchemeName()
String getParameter(String name)
name
- The name of the parameter to be returnedString getRealm()
null
.boolean isConnectionBased()
true
if the scheme is connection based, false
if the scheme is request based.boolean isComplete()
true
if the authentication process has been completed,
false
otherwise.@Deprecated org.apache.http.Header authenticate(Credentials credentials, org.apache.http.HttpRequest request) throws AuthenticationException
ContextAwareAuthScheme.authenticate(Credentials, HttpRequest, org.apache.http.protocol.HttpContext)
Credentials
.credentials
- The set of credentials to be used for athenticationrequest
- The request being authenticatedAuthenticationException
- if authorization string cannot
be generated due to an authentication failureCopyright © 1999–2022 The Apache Software Foundation. All rights reserved.