Top Description Fields Constructors Methods
org.apache.http.impl.auth

public Class NegotiateScheme

extends GGSSchemeBase
Class Inheritance
Annotations
@Deprecated
Imports
java.io.IOException, org.apache.commons.logging.Log, .LogFactory, org.apache.http.Header, .HttpRequest, org.apache.http.auth.AuthenticationException, .Credentials, org.apache.http.protocol.HttpContext, org.apache.http.util.Args, org.ietf.jgss.GSSException, .Oid

Deprecated

(4.2) use SPNegoScheme or KerberosScheme.

SPNEGO (Simple and Protected GSSAPI Negotiation Mechanism) authentication scheme.
Since
4.1

Field Summary

Modifier and TypeField and Description
private static final String
private final Log
private final SpnegoTokenGenerator
spengoGenerator

Deprecated as a consequence of SpnegoTokenGenerator being deprecated.
private static final String

Constructor Summary

AccessConstructor and Description
public
NegotiateScheme(final SpnegoTokenGenerator spengoGenerator, final boolean stripPort)

Deprecated as a consequence of SpnegoTokenGenerator being deprecated.
Default constructor for the Negotiate authentication scheme.
public
NegotiateScheme(final SpnegoTokenGenerator spengoGenerator)

Deprecated as a consequence of SpnegoTokenGenerator being deprecated.
public

Method Summary

Modifier and TypeMethod and Description
public Header
authenticate(final Credentials
The set of credentials to be used for athentication
credentials
,
final HttpRequest
The request being authenticated
request
)

Overrides org.apache.http.impl.auth.GGSSchemeBase.authenticate.

Implements org.apache.http.auth.AuthScheme.authenticate.

Produces an authorization string for the given set of Credentials.
public Header

Returns:

an Negotiate authorisation Header
authenticate
(final Credentials
Never used be the Negotiate scheme but must be provided to satisfy common-httpclient API. Credentials from JAAS will be used instead.
credentials
,
final HttpRequest
The request being authenticated
request
,
final HttpContext
HTTP context
context
)

Overrides org.apache.http.impl.auth.GGSSchemeBase.authenticate.

Implements org.apache.http.auth.ContextAwareAuthScheme.authenticate.

Produces Negotiate authorization Header based on token created by processChallenge.
protected byte[]
generateToken(final byte[] input, final String authServer)

Overrides org.apache.http.impl.auth.GGSSchemeBase.generateToken.

protected byte[]
generateToken(final byte[] input, final String authServer, final Credentials credentials)

Overrides org.apache.http.impl.auth.GGSSchemeBase.generateToken.

public String

Returns:

the parameter with the given name
getParameter
(final String
The name of the parameter to be returned
name
)

Implements org.apache.http.auth.AuthScheme.getParameter.

Returns the authentication parameter with the given name, if available.
public String

Returns:

null
getRealm
()

Implements org.apache.http.auth.AuthScheme.getRealm.

The concept of an authentication realm is not supported by the Negotiate authentication scheme.
public String

Returns:

Negotiate
getSchemeName
()

Implements org.apache.http.auth.AuthScheme.getSchemeName.

Returns textual designation of the Negotiate authentication scheme.
public boolean
Inherited from org.apache.http.impl.auth.GGSSchemeBase:
createGSSContextgenerateGSSTokengenerateGSSTokengetManagerisCompleteparseChallenge

Field Detail

KERBEROS_OIDback to summary
private static final String KERBEROS_OID
logback to summary
private final Log log

Hides org.apache.http.impl.auth.GGSSchemeBase.log.

spengoGeneratorback to summary
private final SpnegoTokenGenerator spengoGenerator

Deprecated

as a consequence of SpnegoTokenGenerator being deprecated. See corresponding docs for further information.

SPNEGO_OIDback to summary
private static final String SPNEGO_OID

Constructor Detail

NegotiateSchemeback to summary
public NegotiateScheme(final SpnegoTokenGenerator spengoGenerator, final boolean stripPort)

Deprecated

as a consequence of SpnegoTokenGenerator being deprecated. See corresponding docs for further information.

Default constructor for the Negotiate authentication scheme.

NegotiateSchemeback to summary
public NegotiateScheme(final SpnegoTokenGenerator spengoGenerator)

Deprecated

as a consequence of SpnegoTokenGenerator being deprecated. See corresponding docs for further information.

NegotiateSchemeback to summary
public NegotiateScheme()

Method Detail

authenticateback to summary
public Header authenticate(final Credentials credentials, final HttpRequest request) throws AuthenticationException

Overrides org.apache.http.impl.auth.GGSSchemeBase.authenticate.

Implements org.apache.http.auth.AuthScheme.authenticate.

Doc from org.apache.http.auth.AuthScheme.authenticate.

Produces an authorization string for the given set of Credentials.

Parameters
credentials:Credentials

The set of credentials to be used for athentication

request:HttpRequest

The request being authenticated

Returns:Header

the authorization string

Annotations
@Override
Exceptions
AuthenticationException:
if authorization string cannot be generated due to an authentication failure
authenticateback to summary
public Header authenticate(final Credentials credentials, final HttpRequest request, final HttpContext context) throws AuthenticationException

Overrides org.apache.http.impl.auth.GGSSchemeBase.authenticate.

Implements org.apache.http.auth.ContextAwareAuthScheme.authenticate.

Produces Negotiate authorization Header based on token created by processChallenge.

Parameters
credentials:Credentials

Never used be the Negotiate scheme but must be provided to satisfy common-httpclient API. Credentials from JAAS will be used instead.

request:HttpRequest

The request being authenticated

context:HttpContext

Doc from org.apache.http.auth.ContextAwareAuthScheme.authenticate.

HTTP context

Returns:Header

an Negotiate authorisation Header

Annotations
@Override
Exceptions
AuthenticationException:
if authorisation string cannot be generated due to an authentication failure
generateTokenback to summary
protected byte[] generateToken(final byte[] input, final String authServer) throws GSSException

Overrides org.apache.http.impl.auth.GGSSchemeBase.generateToken.

Annotations
@Override
generateTokenback to summary
protected byte[] generateToken(final byte[] input, final String authServer, final Credentials credentials) throws GSSException

Overrides org.apache.http.impl.auth.GGSSchemeBase.generateToken.

Annotations
@Override
getParameterback to summary
public String getParameter(final String name)

Implements org.apache.http.auth.AuthScheme.getParameter.

Returns the authentication parameter with the given name, if available.

There are no valid parameters for Negotiate authentication so this method always returns null.

Parameters
name:String

The name of the parameter to be returned

Returns:String

the parameter with the given name

Annotations
@Override
getRealmback to summary
public String getRealm()

Implements org.apache.http.auth.AuthScheme.getRealm.

The concept of an authentication realm is not supported by the Negotiate authentication scheme. Always returns null.

Returns:String

null

Annotations
@Override
getSchemeNameback to summary
public String getSchemeName()

Implements org.apache.http.auth.AuthScheme.getSchemeName.

Returns textual designation of the Negotiate authentication scheme.

Returns:String

Negotiate

Annotations
@Override
isConnectionBasedback to summary
public boolean isConnectionBased()

Implements org.apache.http.auth.AuthScheme.isConnectionBased.

Returns true. Negotiate authentication scheme is connection based.

Returns:boolean

true.

Annotations
@Override