Class KerberosScheme
java.lang.Object
org.apache.http.impl.auth.AuthSchemeBase
org.apache.http.impl.auth.GGSSchemeBase
org.apache.http.impl.auth.KerberosScheme
- All Implemented Interfaces:
AuthScheme, ContextAwareAuthScheme
-
Field Summary
Fields inherited from class AuthSchemeBase
challengeState -
Constructor Summary
ConstructorsConstructorDescriptionKerberosScheme(boolean stripPort) KerberosScheme(boolean stripPort, boolean useCanonicalHostname) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.http.Headerauthenticate(Credentials credentials, org.apache.http.HttpRequest request, org.apache.http.protocol.HttpContext context) Produces KERBEROS authorization Header based on token created by processChallenge.protected byte[]generateToken(byte[] input, String authServer) protected byte[]generateToken(byte[] input, String authServer, Credentials credentials) getParameter(String name) There are no valid parameters for KERBEROS authentication so this method always returnsnull.getRealm()The concept of an authentication realm is not supported by the Negotiate authentication scheme.Returns textual designation of the given authentication scheme.booleanReturnstrue.Methods inherited from class GGSSchemeBase
authenticate, generateGSSToken, generateGSSToken, getManager, isComplete, parseChallengeMethods inherited from class AuthSchemeBase
getChallengeState, isProxy, processChallenge, toString
-
Constructor Details
-
KerberosScheme
public KerberosScheme(boolean stripPort, boolean useCanonicalHostname) - Since:
- 4.4
-
KerberosScheme
public KerberosScheme(boolean stripPort) -
KerberosScheme
public KerberosScheme()
-
-
Method Details
-
getSchemeName
Description copied from interface:AuthSchemeReturns textual designation of the given authentication scheme.- Returns:
- the name of the given authentication scheme
-
authenticate
public org.apache.http.Header authenticate(Credentials credentials, org.apache.http.HttpRequest request, org.apache.http.protocol.HttpContext context) throws AuthenticationException Produces KERBEROS authorization Header based on token created by processChallenge.- Specified by:
authenticatein interfaceContextAwareAuthScheme- Overrides:
authenticatein classGGSSchemeBase- Parameters:
credentials- not used by the KERBEROS scheme.request- The request being authenticatedcontext- HTTP context- Returns:
- KERBEROS authentication Header
- Throws:
AuthenticationException- if authentication string cannot be generated due to an authentication failure
-
generateToken
- Overrides:
generateTokenin classGGSSchemeBase- Throws:
GSSException
-
generateToken
protected byte[] generateToken(byte[] input, String authServer, Credentials credentials) throws GSSException - Overrides:
generateTokenin classGGSSchemeBase- Throws:
GSSException
-
getParameter
-
getRealm
The concept of an authentication realm is not supported by the Negotiate authentication scheme. Always returnsnull.- Returns:
null
-
isConnectionBased
public boolean isConnectionBased()Returnstrue. KERBEROS authentication scheme is connection based.- Returns:
true.
-