Package org.apache.http.impl.auth
Class GGSSchemeBase
java.lang.Object
org.apache.http.impl.auth.AuthSchemeBase
org.apache.http.impl.auth.GGSSchemeBase
- All Implemented Interfaces:
AuthScheme,ContextAwareAuthScheme
- Direct Known Subclasses:
KerberosScheme,NegotiateScheme,SPNegoScheme
- Since:
- 4.2
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.apache.commons.codec.binary.Base64private final org.apache.commons.logging.Logprivate GGSSchemeBase.StateAuthentication process stateprivate final booleanprivate byte[]base64 decoded challengeprivate final booleanFields inherited from class org.apache.http.impl.auth.AuthSchemeBase
challengeState -
Constructor Summary
ConstructorsConstructorDescriptionGGSSchemeBase(boolean stripPort) GGSSchemeBase(boolean stripPort, boolean useCanonicalHostname) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.http.Headerauthenticate(Credentials credentials, org.apache.http.HttpRequest request) Deprecated.org.apache.http.Headerauthenticate(Credentials credentials, org.apache.http.HttpRequest request, org.apache.http.protocol.HttpContext context) Produces an authorization string for the given set ofCredentials.(package private) GSSContextcreateGSSContext(GSSManager manager, Oid oid, GSSName serverName, GSSCredential gssCredential) protected byte[]generateGSSToken(byte[] input, Oid oid, String authServer) protected byte[]generateGSSToken(byte[] input, Oid oid, String authServer, Credentials credentials) protected byte[]generateToken(byte[] input, String authServer) Deprecated.protected byte[]generateToken(byte[] input, String authServer, Credentials credentials) protected GSSManagerbooleanAuthentication process may involve a series of challenge-response exchanges.protected voidparseChallenge(org.apache.http.util.CharArrayBuffer buffer, int beginIndex, int endIndex) private StringMethods inherited from class org.apache.http.impl.auth.AuthSchemeBase
getChallengeState, isProxy, processChallenge, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.http.auth.AuthScheme
getParameter, getRealm, getSchemeName, isConnectionBased
-
Field Details
-
log
private final org.apache.commons.logging.Log log -
base64codec
private final org.apache.commons.codec.binary.Base64 base64codec -
stripPort
private final boolean stripPort -
useCanonicalHostname
private final boolean useCanonicalHostname -
state
Authentication process state -
token
private byte[] tokenbase64 decoded challenge
-
-
Constructor Details
-
GGSSchemeBase
GGSSchemeBase(boolean stripPort, boolean useCanonicalHostname) -
GGSSchemeBase
GGSSchemeBase(boolean stripPort) -
GGSSchemeBase
GGSSchemeBase()
-
-
Method Details
-
getManager
-
generateGSSToken
- Throws:
GSSException
-
generateGSSToken
protected byte[] generateGSSToken(byte[] input, Oid oid, String authServer, Credentials credentials) throws GSSException - Throws:
GSSException- Since:
- 4.4
-
createGSSContext
GSSContext createGSSContext(GSSManager manager, Oid oid, GSSName serverName, GSSCredential gssCredential) throws GSSException - Throws:
GSSException
-
generateToken
Deprecated.- Throws:
GSSException
-
generateToken
protected byte[] generateToken(byte[] input, String authServer, Credentials credentials) throws GSSException - Throws:
GSSException- Since:
- 4.4
-
isComplete
public boolean isComplete()Description copied from interface:AuthSchemeAuthentication 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:
trueif the authentication process has been completed,falseotherwise.
-
authenticate
@Deprecated public org.apache.http.Header authenticate(Credentials credentials, org.apache.http.HttpRequest request) throws AuthenticationException Deprecated.Description copied from interface:AuthSchemeProduces an authorization string for the given set ofCredentials.- Parameters:
credentials- The set of credentials to be used for athenticationrequest- The request being authenticated- Returns:
- the authorization string
- Throws:
AuthenticationException- if authorization string cannot be generated due to an authentication failure
-
authenticate
public org.apache.http.Header authenticate(Credentials credentials, org.apache.http.HttpRequest request, org.apache.http.protocol.HttpContext context) throws AuthenticationException Description copied from interface:ContextAwareAuthSchemeProduces an authorization string for the given set ofCredentials.- Specified by:
authenticatein interfaceContextAwareAuthScheme- Overrides:
authenticatein classAuthSchemeBase- Parameters:
credentials- The set of credentials to be used for athenticationrequest- The request being authenticatedcontext- HTTP context- Returns:
- the authorization string
- Throws:
AuthenticationException- if authorization string cannot be generated due to an authentication failure
-
parseChallenge
protected void parseChallenge(org.apache.http.util.CharArrayBuffer buffer, int beginIndex, int endIndex) throws MalformedChallengeException - Specified by:
parseChallengein classAuthSchemeBase- Throws:
MalformedChallengeException
-
resolveCanonicalHostname
- Throws:
UnknownHostException
-
ContextAwareAuthScheme.authenticate(Credentials, HttpRequest, org.apache.http.protocol.HttpContext)