Class SPNegoScheme
java.lang.Object
org.apache.http.impl.auth.AuthSchemeBase
org.apache.http.impl.auth.GGSSchemeBase
org.apache.http.impl.auth.SPNegoScheme
- All Implemented Interfaces:
AuthScheme, ContextAwareAuthScheme
SPNEGO (Simple and Protected GSSAPI Negotiation Mechanism) authentication
scheme.
- Since:
- 4.2
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauthenticate(Credentials credentials, HttpRequest request, HttpContext context) Produces SPNEGO authorization Header based on token created by processChallenge.protected byte[]generateToken(byte[] input, String authServer) getParameter(String name) There are no valid parameters for SPNEGO 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.booleanReturns true.Methods inherited from class GGSSchemeBase
authenticate, generateGSSToken, getManager, isComplete, parseChallengeMethods inherited from class AuthSchemeBase
getChallengeState, isProxy, processChallenge, toString
-
Constructor Details
-
SPNegoScheme
public SPNegoScheme(boolean stripPort) -
SPNegoScheme
public SPNegoScheme()
-
-
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 Header authenticate(Credentials credentials, HttpRequest request, HttpContext context) throws AuthenticationException Produces SPNEGO authorization Header based on token created by processChallenge.- Specified by:
authenticatein interfaceContextAwareAuthScheme- Overrides:
authenticatein classGGSSchemeBase- Parameters:
credentials- not used by the SPNEGO scheme.request- The request being authenticatedcontext- HTTP context- Returns:
- SPNEGO authentication Header
- Throws:
AuthenticationException- if authentication string cannot be generated due to an authentication failure
-
generateToken
- Specified by:
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()Returns true. SPNEGO authentication scheme is connection based.- Returns:
- true.
-