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 the HttpClient
via HttpClient#getAuthenticationStore().
| Modifier and Type | Class and Description |
|---|---|
| private class | |
| private class | |
| private static class | |
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| private final GSSManager | |
| private static final Logger | |
| private static final String | |
| private boolean | |
| private String | |
| private Path | |
| private Path | |
| private String | |
| private String | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Authentication. | authenticate(Request
the request to execute the authentication mechanism for request, ContentResponse the 401 response obtained in the previous attempt to request the protected resource response, Authentication.the headerInfo,WWW-Authenticate (or Proxy-Authenticate) header chosen for this
authentication (among the many that the response may contain)the conversation context in case the authentication needs multiple exchanges
to be completed and information needs to be stored across exchanges context)Implements org. Result that can be
used to actually authenticate the request via Authentication..
|
| public String | |
| public Path | Returns: the path of the ticket cache fileGet the path of the ticket cache file. |
| public String | |
| public Path | Returns: the path of the keyTab file with the user credentialsGet the path of the keyTab file with the user credentials. |
| public String | |
| public String | |
| private Callable | |
| public boolean | |
| public boolean | |
| private SPNEGOAuthentication. | |
| public void | setRenewTGT(boolean
whether to renew the ticket granting ticket renewTGT)Set whether to renew the ticket granting ticket. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void |
| gssManager | back to summary |
|---|---|
| private final GSSManager gssManager | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| NEGOTIATE | back to summary |
|---|---|
| private static final String NEGOTIATE | |
| renewTGT | back to summary |
|---|---|
| private boolean renewTGT | |
| serviceName | back to summary |
|---|---|
| private String serviceName | |
| ticketCachePath | back to summary |
|---|---|
| private Path ticketCachePath | |
| userKeyTabPath | back to summary |
|---|---|
| private Path userKeyTabPath | |
| userName | back to summary |
|---|---|
| private String userName | |
| userPassword | back to summary |
|---|---|
| private String userPassword | |
| useTicketCache | back to summary |
|---|---|
| private boolean useTicketCache | |
| SPNEGOAuthentication | back to summary |
|---|---|
| public SPNEGOAuthentication(URI uri) | |
| authenticate | back to summary |
|---|---|
| public Authentication. Implements org. Doc from org. Executes the authentication mechanism for the given request, returning a
If a request for
| |
| getServiceName | back to summary |
|---|---|
| public String getServiceName() Get the name of the service to use.
| |
| getTicketCachePath | back to summary |
|---|---|
| public Path getTicketCachePath() Get the path of the ticket cache file.
| |
| getType | back to summary |
|---|---|
| public String getType() Implements abstract org.
| |
| getUserKeyTabPath | back to summary |
|---|---|
| public Path getUserKeyTabPath() Get the path of the keyTab file with the user credentials.
| |
| getUserName | back to summary |
|---|---|
| public String getUserName() Get the user name of the user to login.
| |
| getUserPassword | back to summary |
|---|---|
| public String getUserPassword() Get the password of the user to login.
| |
| initGSSContext | back to summary |
|---|---|
| private Callable | |
| isRenewTGT | back to summary |
|---|---|
public boolean isRenewTGT()
| |
| isUseTicketCache | back to summary |
|---|---|
public boolean isUseTicketCache()
| |
| login | back to summary |
|---|---|
| private SPNEGOAuthentication. | |
| setRenewTGT | back to summary |
|---|---|
| public void setRenewTGT(boolean renewTGT) Set whether to renew the ticket granting ticket.
| |
| setServiceName | back to summary |
|---|---|
| public void setServiceName(String serviceName) Set the name of the service to use.
| |
| setTicketCachePath | back to summary |
|---|---|
public void setTicketCachePath(Path ticketCachePath)
| |
| setUserKeyTabPath | back to summary |
|---|---|
public void setUserKeyTabPath(Path userKeyTabPath)
| |
| setUserName | back to summary |
|---|---|
| public void setUserName(String userName) Set user name of the user to login.
| |
| setUserPassword | back to summary |
|---|---|
public void setUserPassword(String userPassword)
| |
| setUseTicketCache | back to summary |
|---|---|
public void setUseTicketCache(boolean useTicketCache)
| |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | handle(Callback[]
an array of callbacks)Callback objects provided
by an underlying security service which contains
the information requested to be retrieved or displayed.Implements javax. Retrieve or display the information requested in the provided Callbacks. |
| PasswordCallbackHandler | back to summary |
|---|---|
| private PasswordCallbackHandler() | |
| handle | back to summary |
|---|---|
| public void handle(Callback[] callbacks) throws IOException Implements javax. Doc from javax. Retrieve or display the information requested in the provided Callbacks. The
| |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public AppConfigurationEntry[] | getAppConfigurationEntry(String
the name used to index the Configuration. name)Implements abstract javax. name
from this Configuration.
|
| SPNEGOConfiguration | back to summary |
|---|---|
| private SPNEGOConfiguration() | |
| getAppConfigurationEntry | back to summary |
|---|---|
| public AppConfigurationEntry[] getAppConfigurationEntry(String name) Implements abstract javax. Doc from javax. Retrieve the AppConfigurationEntries for the specified
| |
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private GSSContext | |
| private Subject |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public String |
| ATTRIBUTE | back to summary |
|---|---|
| private static final String ATTRIBUTE | |
| gssContext | back to summary |
|---|---|
| private GSSContext gssContext | |
| subject | back to summary |
|---|---|
| private Subject subject | |
| SPNEGOContext | back to summary |
|---|---|
| private SPNEGOContext() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| Modifier and Type | Field and Description |
|---|---|
| private final HttpHeader | |
| private final URI | |
| private final String |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | apply(Request
the request to authenticate request)Implements org. |
| public URI |
| header | back to summary |
|---|---|
| private final HttpHeader header | |
| uri | back to summary |
|---|---|
| private final URI uri | |
| value | back to summary |
|---|---|
| private final String value | |
| SPNEGOResult | back to summary |
|---|---|
| public SPNEGOResult(URI uri, String token) | |
| SPNEGOResult | back to summary |
|---|---|
| public SPNEGOResult(URI uri, HttpHeader header, String token) | |
| apply | back to summary |
|---|---|
| public void apply(Request request) Implements org. Doc from org. Applies the authentication result to the given request.
Typically, a | |
| getURI | back to summary |
|---|---|
| public URI getURI() Implements org.
| |