sun.security.mule.krb5.cxf
Class SpnegoTokenContext

java.lang.Object
  extended by sun.security.mule.krb5.cxf.SpnegoTokenContext

public class SpnegoTokenContext
extends Object


Constructor Summary
SpnegoTokenContext()
           
 
Method Summary
 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(org.apache.ws.security.spnego.SpnegoClientAction spnegoClientAction)
          Set a custom SpnegoClientAction implementation to use
 void setSpnegoServiceAction(org.apache.ws.security.spnego.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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpnegoTokenContext

public SpnegoTokenContext()
Method Detail

setKerberosConfig

public void setKerberosConfig(Config kerberosConfig)

retrieveServiceTicket

public void retrieveServiceTicket(CallbackHandler callbackHandler,
                                  String serviceName)
                           throws org.apache.ws.security.WSSecurityException
Retrieve a service ticket from a KDC using the Kerberos JAAS module, and set it in this BinarySecurityToken.

Parameters:
jaasLoginModuleName - the JAAS Login Module name to use
callbackHandler - a CallbackHandler instance to retrieve a password (optional)
serviceName - the desired Kerberized service
Throws:
org.apache.ws.security.WSSecurityException

validateServiceTicket

public void validateServiceTicket(String jaasLoginModuleName,
                                  CallbackHandler callbackHandler,
                                  String serviceName,
                                  byte[] ticket)
                           throws org.apache.ws.security.WSSecurityException
Validate a service ticket.

Parameters:
jaasLoginModuleName -
callbackHandler -
serviceName -
ticket -
Throws:
org.apache.ws.security.WSSecurityException

setMutualAuth

public void setMutualAuth(boolean mutualAuthentication)
Whether to enable mutual authentication or not. This only applies to retrieve service ticket.


getToken

public byte[] getToken()
Get the SPNEGO token that was created.


isEstablished

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


unwrapKey

public byte[] unwrapKey(byte[] secret)
                 throws org.apache.ws.security.WSSecurityException
Unwrap a key

Throws:
org.apache.ws.security.WSSecurityException

wrapKey

public byte[] wrapKey(byte[] secret)
               throws org.apache.ws.security.WSSecurityException
Wrap a key

Throws:
org.apache.ws.security.WSSecurityException

setSpnegoClientAction

public void setSpnegoClientAction(org.apache.ws.security.spnego.SpnegoClientAction spnegoClientAction)
Set a custom SpnegoClientAction implementation to use


setSpnegoServiceAction

public void setSpnegoServiceAction(org.apache.ws.security.spnego.SpnegoServiceAction spnegoServiceAction)
Set a custom SpnegoServiceAction implementation to use


clear

public void clear()


Copyright © 2013. All Rights Reserved.