public class KerberosTokenValidator extends Object
| Constructor and Description |
|---|
KerberosTokenValidator() |
| Modifier and Type | Method and Description |
|---|---|
CallbackHandler |
getCallbackHandler()
Get the CallbackHandler to use with the LoginContext
|
String |
getContextName()
Get the JAAS Login context name to use.
|
String |
getServiceName()
Get the name of the service to use when contacting the KDC.
|
boolean |
isSpnego() |
boolean |
isUsernameServiceNameForm()
SPN can be configured to be in either "hostbased" or "username" form.
- "hostbased" - specifies that the service principal name should be interpreted as a "host-based" name as specified in GSS API Rfc, section "4.1: Host-Based Service Name Form" - The service name, as it is specified in LDAP/AD, as it is listed in the KDC. - "username" - specifies that the service principal name should be interpreted as a "username" name as specified in GSS API Rfc, section "4.2: User Name Form" This is usually the client username in LDAP/AD used for authentication to the KDC. |
void |
setCallbackHandler(CallbackHandler callbackHandler)
Set the CallbackHandler to use with the LoginContext.
|
void |
setContextName(String contextName)
Set the JAAS Login context name to use.
|
void |
setServiceName(String serviceName)
The name of the service to use when contacting the KDC.
|
void |
setSpnego(boolean spnego) |
void |
setUsernameServiceNameForm(boolean isUsernameServiceNameForm)
If true - sets the SPN form to "username"
If false(default) - the SPN form is "hostbased" |
org.apache.wss4j.common.kerberos.KerberosServiceContext |
validate(KerberosServiceRequestToken token) |
public String getContextName()
public void setContextName(String contextName)
contextName - the JAAS Login context name to usepublic CallbackHandler getCallbackHandler()
public void setCallbackHandler(CallbackHandler callbackHandler)
callbackHandler - the CallbackHandler to use with the LoginContextpublic void setServiceName(String serviceName)
serviceName - the name of the service to use when contacting the KDCpublic String getServiceName()
public org.apache.wss4j.common.kerberos.KerberosServiceContext validate(KerberosServiceRequestToken token) throws LoginException, PrivilegedActionException
public boolean isUsernameServiceNameForm()
public void setUsernameServiceNameForm(boolean isUsernameServiceNameForm)
isUsernameServiceNameForm - the isUsernameServiceNameForm to setKerberosSecurity#retrieveServiceTicket(String, CallbackHandler, String, boolean)public boolean isSpnego()
public void setSpnego(boolean spnego)
Apache Fediz