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