Package org.apache.http.impl.auth
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
public class KerberosScheme extends GGSSchemeBase
KERBEROS authentication scheme.- Since:
- 4.2
-
-
Constructor Summary
Constructors Constructor Description KerberosScheme()
KerberosScheme(boolean stripPort)
KerberosScheme(boolean stripPort, boolean useCanonicalHostname)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Header
authenticate(Credentials credentials, HttpRequest request, HttpContext context)
Produces KERBEROS authorization Header based on token created by processChallenge.String
getParameter(String name)
There are no valid parameters for KERBEROS authentication so this method always returnsnull
.String
getRealm()
The concept of an authentication realm is not supported by the Negotiate authentication scheme.String
getSchemeName()
Returns textual designation of the given authentication scheme.boolean
isConnectionBased()
Returnstrue
.-
Methods inherited from class org.apache.http.impl.auth.GGSSchemeBase
authenticate, isComplete
-
Methods inherited from class org.apache.http.impl.auth.AuthSchemeBase
getChallengeState, isProxy, processChallenge, toString
-
-
-
-
Method Detail
-
getSchemeName
public String getSchemeName()
Description copied from interface:AuthScheme
Returns textual designation of the given authentication scheme.- Returns:
- the name of the given authentication scheme
-
authenticate
public Header authenticate(Credentials credentials, HttpRequest request, HttpContext context) throws AuthenticationException
Produces KERBEROS authorization Header based on token created by processChallenge.- Specified by:
authenticate
in interfaceContextAwareAuthScheme
- Overrides:
authenticate
in 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
-
getParameter
public String getParameter(String name)
There are no valid parameters for KERBEROS authentication so this method always returnsnull
.- Parameters:
name
- The name of the parameter to be returned- Returns:
null
-
getRealm
public String 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
.
-
-