public abstract class GGSSchemeBase extends AuthSchemeBase
Modifier and Type | Class and Description |
---|---|
(package private) static class |
GGSSchemeBase.State |
Modifier and Type | Field and Description |
---|---|
private org.apache.commons.codec.binary.Base64 |
base64codec |
private org.apache.commons.logging.Log |
log |
private GGSSchemeBase.State |
state
Authentication process state
|
private boolean |
stripPort |
private byte[] |
token
base64 decoded challenge
|
private boolean |
useCanonicalHostname |
challengeState
Constructor and Description |
---|
GGSSchemeBase() |
GGSSchemeBase(boolean stripPort) |
GGSSchemeBase(boolean stripPort,
boolean useCanonicalHostname) |
Modifier and Type | Method and Description |
---|---|
org.apache.http.Header |
authenticate(Credentials credentials,
org.apache.http.HttpRequest request)
|
org.apache.http.Header |
authenticate(Credentials credentials,
org.apache.http.HttpRequest request,
org.apache.http.protocol.HttpContext context)
Produces an authorization string for the given set of
Credentials . |
(package private) org.ietf.jgss.GSSContext |
createGSSContext(org.ietf.jgss.GSSManager manager,
org.ietf.jgss.Oid oid,
org.ietf.jgss.GSSName serverName,
org.ietf.jgss.GSSCredential gssCredential) |
protected byte[] |
generateGSSToken(byte[] input,
org.ietf.jgss.Oid oid,
java.lang.String authServer) |
protected byte[] |
generateGSSToken(byte[] input,
org.ietf.jgss.Oid oid,
java.lang.String authServer,
Credentials credentials) |
protected byte[] |
generateToken(byte[] input,
java.lang.String authServer)
Deprecated.
|
protected byte[] |
generateToken(byte[] input,
java.lang.String authServer,
Credentials credentials) |
protected org.ietf.jgss.GSSManager |
getManager() |
boolean |
isComplete()
Authentication process may involve a series of challenge-response exchanges.
|
protected void |
parseChallenge(org.apache.http.util.CharArrayBuffer buffer,
int beginIndex,
int endIndex) |
private java.lang.String |
resolveCanonicalHostname(java.lang.String host) |
getChallengeState, isProxy, processChallenge, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getParameter, getRealm, getSchemeName, isConnectionBased
private final org.apache.commons.logging.Log log
private final org.apache.commons.codec.binary.Base64 base64codec
private final boolean stripPort
private final boolean useCanonicalHostname
private GGSSchemeBase.State state
private byte[] token
GGSSchemeBase(boolean stripPort, boolean useCanonicalHostname)
GGSSchemeBase(boolean stripPort)
GGSSchemeBase()
protected org.ietf.jgss.GSSManager getManager()
protected byte[] generateGSSToken(byte[] input, org.ietf.jgss.Oid oid, java.lang.String authServer) throws org.ietf.jgss.GSSException
org.ietf.jgss.GSSException
protected byte[] generateGSSToken(byte[] input, org.ietf.jgss.Oid oid, java.lang.String authServer, Credentials credentials) throws org.ietf.jgss.GSSException
org.ietf.jgss.GSSException
org.ietf.jgss.GSSContext createGSSContext(org.ietf.jgss.GSSManager manager, org.ietf.jgss.Oid oid, org.ietf.jgss.GSSName serverName, org.ietf.jgss.GSSCredential gssCredential) throws org.ietf.jgss.GSSException
org.ietf.jgss.GSSException
@Deprecated protected byte[] generateToken(byte[] input, java.lang.String authServer) throws org.ietf.jgss.GSSException
generateToken(byte[], String, org.apache.http.auth.Credentials)
.org.ietf.jgss.GSSException
protected byte[] generateToken(byte[] input, java.lang.String authServer, Credentials credentials) throws org.ietf.jgss.GSSException
org.ietf.jgss.GSSException
public boolean isComplete()
AuthScheme
true
if the authentication process has been completed,
false
otherwise.@Deprecated public org.apache.http.Header authenticate(Credentials credentials, org.apache.http.HttpRequest request) throws AuthenticationException
ContextAwareAuthScheme.authenticate(
Credentials, HttpRequest, org.apache.http.protocol.HttpContext)
AuthScheme
Credentials
.credentials
- The set of credentials to be used for athenticationrequest
- The request being authenticatedAuthenticationException
- if authorization string cannot
be generated due to an authentication failurepublic org.apache.http.Header authenticate(Credentials credentials, org.apache.http.HttpRequest request, org.apache.http.protocol.HttpContext context) throws AuthenticationException
ContextAwareAuthScheme
Credentials
.authenticate
in interface ContextAwareAuthScheme
authenticate
in class AuthSchemeBase
credentials
- The set of credentials to be used for athenticationrequest
- The request being authenticatedcontext
- HTTP contextAuthenticationException
- if authorization string cannot
be generated due to an authentication failureprotected void parseChallenge(org.apache.http.util.CharArrayBuffer buffer, int beginIndex, int endIndex) throws MalformedChallengeException
parseChallenge
in class AuthSchemeBase
MalformedChallengeException
private java.lang.String resolveCanonicalHostname(java.lang.String host) throws java.net.UnknownHostException
java.net.UnknownHostException