|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AuthScheme
This interface represents an abstract challenge-response oriented authentication scheme.
An authentication scheme should be able to support the following functions:
Authentication schemes may ignore method name and URI parameters if they are not relevant for the given authentication mechanism
Authentication schemes may be stateful involving a series of challenge-response exchanges
Method Summary | |
---|---|
void |
authenticateHost(AuthScope authscope,
Credentials credentials,
HttpState state,
HttpMethod method)
Configures the given HttpMethod for authentication to the host
with the given Credentials . |
void |
authenticateProxy(AuthScope authScope,
Credentials credentials,
HttpState state,
HttpMethod method)
Configures the given HttpMethod for authentication to the proxy
with the given Credentials . |
java.lang.String |
getParameter(java.lang.String name)
Returns authentication parameter with the given name, if available. |
java.lang.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(java.lang.String challenge)
Processes the given challenge token. |
boolean |
supportsCredentials(Credentials credentials)
Determines whether this auth scheme supports credentials of the given type. |
Method Detail |
---|
boolean supportsCredentials(Credentials credentials)
credentialClass
- The type of credentials to query
void processChallenge(java.lang.String challenge) throws MalformedChallengeException
challenge
- the challenge string
MalformedChallengeException
java.lang.String getSchemeName()
java.lang.String getParameter(java.lang.String name)
name
- The name of the parameter to be returned
boolean isConnectionBased()
boolean isComplete()
void authenticateHost(AuthScope authscope, Credentials credentials, HttpState state, HttpMethod method) throws AuthenticationException
HttpMethod
for authentication to the host
with the given Credentials
.
authscope
- The authentication scopecredentials
- The set of credentials to be used for athenticationmethod
- The method being authenticated
AuthenticationException
- if authorization string cannot be generated due to an
authentication failurevoid authenticateProxy(AuthScope authScope, Credentials credentials, HttpState state, HttpMethod method) throws AuthenticationException
HttpMethod
for authentication to the proxy
with the given Credentials
.
authscope
- The authentication scopecredentials
- The set of credentials to be used for athenticationmethod
- The method being authenticated
AuthenticationException
- if authorization string cannot be generated due to an
authentication failure
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |