public class NegotiateScheme extends Object implements AuthScheme
| Constructor and Description |
|---|
NegotiateScheme()
Default constructor for the Negotiate authentication scheme.
|
NegotiateScheme(String challenge)
Constructor for the Negotiate authentication scheme.
|
| Modifier and Type | Method and Description |
|---|---|
String |
authenticate(Credentials credentials,
HttpMethod method)
Produces Negotiate authorization string based on token created by
processChallenge.
|
String |
authenticate(Credentials credentials,
String method,
String uri)
Deprecated.
|
String |
getID()
Deprecated.
no longer used
|
String |
getParameter(String name)
Returns the authentication parameter with the given name, if available.
|
String |
getRealm()
The concept of an authentication realm is not supported by the Negotiate
authentication scheme.
|
String |
getSchemeName()
Returns textual designation of the Negotiate authentication scheme.
|
protected void |
init(String server)
Init GSSContext for negotiation.
|
boolean |
isComplete()
Tests if the Negotiate authentication process has been completed.
|
boolean |
isConnectionBased()
Returns true.
|
void |
processChallenge(String challenge)
Processes the Negotiate challenge.
|
public NegotiateScheme()
public NegotiateScheme(String challenge)
challenge - The authentication challengeprotected void init(String server) throws GSSException
server - servername only (e.g: radar.it.su.se)GSSExceptionpublic void processChallenge(String challenge)
processChallenge in interface AuthSchemechallenge - the challenge stringpublic boolean isComplete()
isComplete in interface AuthSchemepublic String getSchemeName()
getSchemeName in interface AuthSchemeNegotiatepublic String getRealm()
null.getRealm in interface AuthSchemenullpublic String getID()
Additionally, the ID should take into account any changes to the authentication challenge and return a different value when appropriate. For example when the realm changes in basic authentication it should be considered a different authentication attempt and a different value should be returned.
getID in interface AuthSchemepublic String getParameter(String name)
There are no valid parameters for Negotiate authentication so this method always returns null.
getParameter in interface AuthSchemename - The name of the parameter to be returnedpublic boolean isConnectionBased()
isConnectionBased in interface AuthSchemepublic String authenticate(Credentials credentials, String method, String uri) throws AuthenticationException
authenticate(Credentials, HttpMethod)authenticate in interface AuthSchemecredentials - The set of credentials to be used for athenticationmethod - The name of the method that requires authorization.
This parameter may be ignored, if it is irrelevant
or not applicable to the given authentication schemeuri - The URI for which authorization is needed.
This parameter may be ignored, if it is irrelevant or not
applicable to the given authentication schemeAuthenticationException - if called.HttpMethod.getName(),
HttpMethod.getPath()public String authenticate(Credentials credentials, HttpMethod method) throws AuthenticationException
authenticate in interface AuthSchemecredentials - Never used be the Negotiate scheme but must be provided to
satisfy common-httpclient API. Credentials from JAAS will be used insted.method - The method being authenticatedAuthenticationException - if authorization string cannot
be generated due to an authentication failureCopyright © 2012 Apache Software Foundation. All Rights Reserved.