Package org.apache.wss4j.common.spnego
Class DefaultSpnegoClientAction
java.lang.Object
org.apache.wss4j.common.spnego.DefaultSpnegoClientAction
- All Implemented Interfaces:
PrivilegedAction<byte[]>,SpnegoClientAction
This class represents a PrivilegedAction implementation to obtain a (SPNEGO) service ticket from a
Kerberos Key Distribution Center.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the GSSContext that was created after a service ticket was obtainedbyte[]run()Obtain a service ticketvoidsetMutualAuth(boolean mutualAuthentication) Whether to enable mutual authentication or not.voidsetServiceName(String serviceName) The Service NamevoidsetUserNameServiceForm(boolean isUsernameServiceNameForm) If true - sets the SPN form to "username"
If false(default) - the SPN form is "hostbased"
-
Constructor Details
-
DefaultSpnegoClientAction
public DefaultSpnegoClientAction()
-
-
Method Details
-
setMutualAuth
public void setMutualAuth(boolean mutualAuthentication) Whether to enable mutual authentication or not.- Specified by:
setMutualAuthin interfaceSpnegoClientAction
-
setServiceName
The Service Name- Specified by:
setServiceNamein interfaceSpnegoClientAction
-
run
public byte[] run()Obtain a service ticket- Specified by:
runin interfacePrivilegedAction<byte[]>- Specified by:
runin interfaceSpnegoClientAction
-
getContext
Get the GSSContext that was created after a service ticket was obtained- Specified by:
getContextin interfaceSpnegoClientAction
-
setUserNameServiceForm
public void setUserNameServiceForm(boolean isUsernameServiceNameForm) Description copied from interface:SpnegoClientActionIf true - sets the SPN form to "username"
If false(default) - the SPN form is "hostbased"- Specified by:
setUserNameServiceFormin interfaceSpnegoClientAction- Parameters:
isUsernameServiceNameForm- the isUsernameServiceNameForm to set
-