Class SpnegoProvider
java.lang.Object
org.silverpeas.sso.kerberos.spnego.SpnegoProvider
This is a Utility Class that can be used for finer grained control
over message integrity, confidentiality and mutual authentication.
This Class is exposed for developers who want to implement a custom HTTP client.
Take a look at the SpnegoHttpURLConnection class and the
KerberosSpnegoFilter class before attempting to implement your
own HTTP client.
For more example usage, see the documentation at http://spnego.sourceforge.net
- Author:
- Darwin V. Felix
-
Method Summary
Modifier and TypeMethodDescriptionstatic GSSCredentialgetClientCredential(Subject subject) Returns the GSS-API interface for creating a security context.static GSSContextgetGSSContext(GSSCredential creds, URL url) Returns a GSSContext to be used by custom clients to set data integrity requirements, confidentiality and if mutual authentication is required.static CallbackHandlergetUsernamePasswordHandler(String username, String password) Used by the BASIC Auth mechanism for establishing a LoginContext to authenticate a client/caller/request.
-
Method Details
-
getClientCredential
Returns the GSS-API interface for creating a security context.- Parameters:
subject- the person to be authenticated- Returns:
- GSSCredential to be used for creating a security context.
- Throws:
PrivilegedActionException- if a disallowed action is performed
-
getGSSContext
Returns a GSSContext to be used by custom clients to set data integrity requirements, confidentiality and if mutual authentication is required.- Parameters:
creds- credentials of the person to be authenticatedurl- HTTP address of server (used for constructing aGSSName).- Returns:
- GSSContext
- Throws:
GSSException- if the SSO negotiation fails
-
getUsernamePasswordHandler
Used by the BASIC Auth mechanism for establishing a LoginContext to authenticate a client/caller/request.- Parameters:
username- client usernamepassword- client password- Returns:
- CallbackHandler to be used for establishing a LoginContext
-