public class

SpnegoTokenContext

extends Object
java.lang.Object
   ↳ sun.security.mule.krb5.cxf.SpnegoTokenContext

Summary

Fields
private static final Log LOG
private SpnegoClientAction clientAction
private Config kerberosConfig
private boolean mutualAuth
private GSSContext secContext
private SpnegoServiceAction serviceAction
private byte[] token
Public Constructors
SpnegoTokenContext()
Public Methods
void clear()
byte[] getToken()
Get the SPNEGO token that was created.
boolean isEstablished()
Whether a connection has been established (at the service side)
void retrieveServiceTicket(CallbackHandler callbackHandler, String serviceName)
Retrieve a service ticket from a KDC using the Kerberos JAAS module, and set it in this BinarySecurityToken.
void setKerberosConfig(Config kerberosConfig)
void setMutualAuth(boolean mutualAuthentication)
Whether to enable mutual authentication or not.
void setSpnegoClientAction(SpnegoClientAction spnegoClientAction)
Set a custom SpnegoClientAction implementation to use
void setSpnegoServiceAction(SpnegoServiceAction spnegoServiceAction)
Set a custom SpnegoServiceAction implementation to use
byte[] unwrapKey(byte[] secret)
Unwrap a key
void validateServiceTicket(String jaasLoginModuleName, CallbackHandler callbackHandler, String serviceName, byte[] ticket)
Validate a service ticket.
byte[] wrapKey(byte[] secret)
Wrap a key
[Expand]
Inherited Methods
From class java.lang.Object

Fields

private static final Log LOG

private SpnegoClientAction clientAction

private Config kerberosConfig

private boolean mutualAuth

private GSSContext secContext

private SpnegoServiceAction serviceAction

private byte[] token

Public Constructors

public SpnegoTokenContext ()

Public Methods

public void clear ()

public byte[] getToken ()

Get the SPNEGO token that was created.

public boolean isEstablished ()

Whether a connection has been established (at the service side)

public void retrieveServiceTicket (CallbackHandler callbackHandler, String serviceName)

Retrieve a service ticket from a KDC using the Kerberos JAAS module, and set it in this BinarySecurityToken.

Parameters
callbackHandler A CallbackHandler instance to retrieve a password (optional)
serviceName The desired Kerberized service
Throws
WSSecurityException

public void setKerberosConfig (Config kerberosConfig)

Parameters
kerberosConfig

public void setMutualAuth (boolean mutualAuthentication)

Whether to enable mutual authentication or not. This only applies to retrieve service ticket.

Parameters
mutualAuthentication

public void setSpnegoClientAction (SpnegoClientAction spnegoClientAction)

Set a custom SpnegoClientAction implementation to use

Parameters
spnegoClientAction

public void setSpnegoServiceAction (SpnegoServiceAction spnegoServiceAction)

Set a custom SpnegoServiceAction implementation to use

Parameters
spnegoServiceAction

public byte[] unwrapKey (byte[] secret)

Unwrap a key

Parameters
secret
Throws
WSSecurityException

public void validateServiceTicket (String jaasLoginModuleName, CallbackHandler callbackHandler, String serviceName, byte[] ticket)

Validate a service ticket.

Parameters
jaasLoginModuleName
callbackHandler
serviceName
ticket
Throws
WSSecurityException

public byte[] wrapKey (byte[] secret)

Wrap a key

Parameters
secret
Throws
WSSecurityException