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

public abstract Class GGSSchemeBase

extends AuthSchemeBase
Class Inheritance
Known Direct Subclasses
org.apache.http.impl.auth.KerberosScheme, org.apache.http.impl.auth.NegotiateScheme, org.apache.http.impl.auth.SPNegoScheme
Imports
java.net.InetAddress, .UnknownHostException, org.apache.commons.codec.binary.Base64, org.apache.commons.logging.Log, .LogFactory, org.apache.http.Header, .HttpHost, .HttpRequest, org.apache.http.auth.AUTH, .AuthenticationException, .Credentials, .InvalidCredentialsException, .KerberosCredentials, .MalformedChallengeException, org.apache.http.client.protocol.HttpClientContext, org.apache.http.conn.routing.HttpRoute, org.apache.http.message.BufferedHeader, org.apache.http.protocol.HttpContext, org.apache.http.util.Args, .CharArrayBuffer, org.ietf.jgss.GSSContext, .GSSCredential, .GSSException, .GSSManager, .GSSName, .Oid

Since
4.2

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static enum

Field Summary

Modifier and TypeField and Description
private final Base64
private final Log
private GGSSchemeBase.State
state

Authentication process state

private final boolean
private byte[]
token

base64 decoded challenge

private final boolean
Inherited from org.apache.http.impl.auth.AuthSchemeBase:
challengeState

Constructor Summary

AccessConstructor and Description
pack-priv
GGSSchemeBase(final boolean stripPort, final boolean useCanonicalHostname)

pack-priv
GGSSchemeBase(final boolean stripPort)

pack-priv

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
)

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

Produces an authorization string for the given set of Credentials.
public Header
authenticate(final Credentials
The set of credentials to be used for athentication
credentials
,
final HttpRequest
The request being authenticated
request
,
final HttpContext
HTTP context
context
)

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

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

Produces an authorization string for the given set of Credentials.
pack-priv GSSContext
createGSSContext(final GSSManager manager, final Oid oid, final GSSName serverName, final GSSCredential gssCredential)

protected byte[]
generateGSSToken(final byte[] input, final Oid oid, final String authServer)

protected byte[]
generateGSSToken(final byte[] input, final Oid oid, final String authServer, final Credentials credentials)

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

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

protected GSSManager
public boolean
isComplete()

Implements org.apache.http.auth.AuthScheme.isComplete.

Authentication process may involve a series of challenge-response exchanges.
protected void
parseChallenge(final CharArrayBuffer buffer, final int beginIndex, final int endIndex)

Implements abstract org.apache.http.impl.auth.AuthSchemeBase.parseChallenge.

private String
Inherited from org.apache.http.impl.auth.AuthSchemeBase:
getChallengeStateisProxyprocessChallengetoString

Field Detail

base64codecback to summary
private final Base64 base64codec
logback to summary
private final Log log
stateback to summary
private GGSSchemeBase.State state

Authentication process state

stripPortback to summary
private final boolean stripPort
tokenback to summary
private byte[] token

base64 decoded challenge

useCanonicalHostnameback to summary
private final boolean useCanonicalHostname

Constructor Detail

GGSSchemeBaseback to summary
pack-priv GGSSchemeBase(final boolean stripPort, final boolean useCanonicalHostname)
GGSSchemeBaseback to summary
pack-priv GGSSchemeBase(final boolean stripPort)
GGSSchemeBaseback to summary
pack-priv GGSSchemeBase()

Method Detail

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

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
@Deprecated
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.AuthSchemeBase.authenticate.

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

Doc from org.apache.http.auth.ContextAwareAuthScheme.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

context:HttpContext

HTTP context

Returns:Header

the authorization string

Annotations
@Override
Exceptions
AuthenticationException:
if authorization string cannot be generated due to an authentication failure
createGSSContextback to summary
pack-priv GSSContext createGSSContext(final GSSManager manager, final Oid oid, final GSSName serverName, final GSSCredential gssCredential) throws GSSException
generateGSSTokenback to summary
protected byte[] generateGSSToken(final byte[] input, final Oid oid, final String authServer) throws GSSException
generateGSSTokenback to summary
protected byte[] generateGSSToken(final byte[] input, final Oid oid, final String authServer, final Credentials credentials) throws GSSException
Since
4.4
generateTokenback to summary
protected byte[] generateToken(final byte[] input, final String authServer) throws GSSException
Annotations
@Deprecated
generateTokenback to summary
protected byte[] generateToken(final byte[] input, final String authServer, final Credentials credentials) throws GSSException
Annotations
@SuppressWarnings:deprecation
Since
4.4
getManagerback to summary
protected GSSManager getManager()
isCompleteback to summary
public boolean isComplete()

Implements org.apache.http.auth.AuthScheme.isComplete.

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

Authentication process may involve a series of challenge-response exchanges. This method tests if the authorization process has been completed, either successfully or unsuccessfully, that is, all the required authorization challenges have been processed in their entirety.

Returns:boolean

true if the authentication process has been completed, false otherwise.

Annotations
@Override
parseChallengeback to summary
protected void parseChallenge(final CharArrayBuffer buffer, final int beginIndex, final int endIndex) throws MalformedChallengeException

Implements abstract org.apache.http.impl.auth.AuthSchemeBase.parseChallenge.

Annotations
@Override
resolveCanonicalHostnameback to summary
private String resolveCanonicalHostname(final String host) throws UnknownHostException
org.apache.http.impl.auth back to summary

pack-priv final Enum GGSSchemeBase.State

extends Enum<GGSSchemeBase.State>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final GGSSchemeBase.State
public static final GGSSchemeBase.State
public static final GGSSchemeBase.State
public static final GGSSchemeBase.State

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static GGSSchemeBase.State
public static GGSSchemeBase.State[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

CHALLENGE_RECEIVEDback to summary
public static final GGSSchemeBase.State CHALLENGE_RECEIVED
FAILEDback to summary
public static final GGSSchemeBase.State FAILED
TOKEN_GENERATEDback to summary
public static final GGSSchemeBase.State TOKEN_GENERATED
UNINITIATEDback to summary
public static final GGSSchemeBase.State UNINITIATED

Constructor Detail

Stateback to summary
private State()

Method Detail

valueOfback to summary
public static GGSSchemeBase.State valueOf(String name)
valuesback to summary
public static GGSSchemeBase.State[] values()