Package org.eclipse.jetty.client.util
Class SPNEGOAuthentication
- java.lang.Object
-
- org.eclipse.jetty.client.util.AbstractAuthentication
-
- org.eclipse.jetty.client.util.SPNEGOAuthentication
-
- All Implemented Interfaces:
Authentication
@Deprecated(since="2021-05-27") public class SPNEGOAuthentication extends AbstractAuthentication
Deprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.Implementation of the SPNEGO (or "Negotiate") authentication defined in RFC 4559.
A
user
is logged in via JAAS (either via userName/password or via userName/keyTab) once only.For every request that needs authentication, a
GSSContext
is initiated and later established after reading the response from the server.Applications should create objects of this class and add them to the
AuthenticationStore
retrieved from theHttpClient
viaHttpClient.getAuthenticationStore()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SPNEGOAuthentication.SPNEGOResult
Deprecated.-
Nested classes/interfaces inherited from interface org.eclipse.jetty.client.api.Authentication
Authentication.HeaderInfo, Authentication.Result
-
-
Field Summary
-
Fields inherited from interface org.eclipse.jetty.client.api.Authentication
ANY_REALM
-
-
Constructor Summary
Constructors Constructor Description SPNEGOAuthentication(java.net.URI uri)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Authentication.Result
authenticate(Request request, ContentResponse response, Authentication.HeaderInfo headerInfo, Attributes context)
Deprecated.Executes the authentication mechanism for the given request, returning aAuthentication.Result
that can be used to actually authenticate the request viaAuthentication.Result.apply(Request)
.java.lang.String
getServiceName()
Deprecated.java.nio.file.Path
getTicketCachePath()
Deprecated.java.lang.String
getType()
Deprecated.java.nio.file.Path
getUserKeyTabPath()
Deprecated.java.lang.String
getUserName()
Deprecated.java.lang.String
getUserPassword()
Deprecated.boolean
isRenewTGT()
Deprecated.boolean
isUseTicketCache()
Deprecated.void
setRenewTGT(boolean renewTGT)
Deprecated.void
setServiceName(java.lang.String serviceName)
Deprecated.void
setTicketCachePath(java.nio.file.Path ticketCachePath)
Deprecated.void
setUserKeyTabPath(java.nio.file.Path userKeyTabPath)
Deprecated.void
setUserName(java.lang.String userName)
Deprecated.void
setUserPassword(java.lang.String userPassword)
Deprecated.void
setUseTicketCache(boolean useTicketCache)
Deprecated.-
Methods inherited from class org.eclipse.jetty.client.util.AbstractAuthentication
getRealm, getURI, matches, matchesURI
-
-
-
-
Method Detail
-
getType
public java.lang.String getType()
Deprecated.- Specified by:
getType
in classAbstractAuthentication
-
getUserName
public java.lang.String getUserName()
Deprecated.- Returns:
- the user name of the user to login
-
setUserName
public void setUserName(java.lang.String userName)
Deprecated.- Parameters:
userName
- user name of the user to login
-
getUserPassword
public java.lang.String getUserPassword()
Deprecated.- Returns:
- the password of the user to login
-
setUserPassword
public void setUserPassword(java.lang.String userPassword)
Deprecated.- Parameters:
userPassword
- the password of the user to login- See Also:
setUserKeyTabPath(Path)
-
getUserKeyTabPath
public java.nio.file.Path getUserKeyTabPath()
Deprecated.- Returns:
- the path of the keyTab file with the user credentials
-
setUserKeyTabPath
public void setUserKeyTabPath(java.nio.file.Path userKeyTabPath)
Deprecated.- Parameters:
userKeyTabPath
- the path of the keyTab file with the user credentials- See Also:
setUserPassword(String)
-
getServiceName
public java.lang.String getServiceName()
Deprecated.- Returns:
- the name of the service to use
-
setServiceName
public void setServiceName(java.lang.String serviceName)
Deprecated.- Parameters:
serviceName
- the name of the service to use
-
isUseTicketCache
public boolean isUseTicketCache()
Deprecated.- Returns:
- whether to use the ticket cache during login
-
setUseTicketCache
public void setUseTicketCache(boolean useTicketCache)
Deprecated.- Parameters:
useTicketCache
- whether to use the ticket cache during login- See Also:
setTicketCachePath(Path)
-
getTicketCachePath
public java.nio.file.Path getTicketCachePath()
Deprecated.- Returns:
- the path of the ticket cache file
-
setTicketCachePath
public void setTicketCachePath(java.nio.file.Path ticketCachePath)
Deprecated.- Parameters:
ticketCachePath
- the path of the ticket cache file- See Also:
setUseTicketCache(boolean)
-
isRenewTGT
public boolean isRenewTGT()
Deprecated.- Returns:
- whether to renew the ticket granting ticket
-
setRenewTGT
public void setRenewTGT(boolean renewTGT)
Deprecated.- Parameters:
renewTGT
- whether to renew the ticket granting ticket
-
authenticate
public Authentication.Result authenticate(Request request, ContentResponse response, Authentication.HeaderInfo headerInfo, Attributes context)
Deprecated.Description copied from interface:Authentication
Executes the authentication mechanism for the given request, returning aAuthentication.Result
that can be used to actually authenticate the request viaAuthentication.Result.apply(Request)
.If a request for
"/secure"
returns aAuthentication.Result
, then the result may be used for other requests such as"/secure/foo"
or"/secure/bar"
, unless those resources are protected by other realms.- Parameters:
request
- the request to execute the authentication mechanism forresponse
- the 401 response obtained in the previous attempt to request the protected resourceheaderInfo
- theWWW-Authenticate
(orProxy-Authenticate
) header chosen for this authentication (among the many that the response may contain)context
- the conversation context in case the authentication needs multiple exchanges to be completed and information needs to be stored across exchanges- Returns:
- the authentication result, or null if the authentication could not be performed
-
-