public class

NegotiateScheme

extends AuthSchemeBase
java.lang.Object
   ↳ org.apache.http.impl.auth.AuthSchemeBase
     ↳ org.apache.http.impl.auth.NegotiateScheme

Class Overview

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

Summary

Public Constructors
NegotiateScheme(SpnegoTokenGenerator spengoGenerator, boolean stripPort)
Default constructor for the Negotiate authentication scheme.
NegotiateScheme(SpnegoTokenGenerator spengoGenerator)
NegotiateScheme()
Public Methods
Header authenticate(Credentials credentials, HttpRequest request)
Header authenticate(Credentials credentials, HttpRequest request, HttpContext context)
Produces Negotiate authorization Header based on token created by processChallenge.
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.
boolean isComplete()
Tests if the Negotiate authentication process has been completed.
boolean isConnectionBased()
Returns true.
Protected Methods
GSSManager getManager()
void parseChallenge(CharArrayBuffer buffer, int beginIndex, int endIndex)
[Expand]
Inherited Methods
From class org.apache.http.impl.auth.AuthSchemeBase
From class java.lang.Object
From interface org.apache.http.auth.AuthScheme
From interface org.apache.http.auth.ContextAwareAuthScheme

Public Constructors

public NegotiateScheme (SpnegoTokenGenerator spengoGenerator, boolean stripPort)

Also: HttpClient

Default constructor for the Negotiate authentication scheme.

public NegotiateScheme (SpnegoTokenGenerator spengoGenerator)

Also: HttpClient

public NegotiateScheme ()

Also: HttpClient

Public Methods

public Header authenticate (Credentials credentials, HttpRequest request)

Also: HttpClient

public Header authenticate (Credentials credentials, HttpRequest request, HttpContext context)

Also: HttpClient

Produces Negotiate authorization Header based on token created by processChallenge.

Parameters
credentials Never used be the Negotiate scheme but must be provided to satisfy common-httpclient API. Credentials from JAAS will be used instead.
request The request being authenticated
context HTTP context
Returns
  • an Negotiate authorisation Header
Throws
AuthenticationException if authorisation string cannot be generated due to an authentication failure

public String getParameter (String name)

Also: HttpClient

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 The name of the parameter to be returned
Returns
  • the parameter with the given name

public String getRealm ()

Also: HttpClient

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

Returns
  • null

public String getSchemeName ()

Also: HttpClient

Returns textual designation of the Negotiate authentication scheme.

Returns
  • Negotiate

public boolean isComplete ()

Also: HttpClient

Tests if the Negotiate authentication process has been completed.

Returns
  • true if authorization has been processed, false otherwise.

public boolean isConnectionBased ()

Also: HttpClient

Returns true. Negotiate authentication scheme is connection based.

Returns
  • true.

Protected Methods

protected GSSManager getManager ()

Also: HttpClient

protected void parseChallenge (CharArrayBuffer buffer, int beginIndex, int endIndex)

Also: HttpClient