Package org.apache.wss4j.common.kerberos
Class KerberosContext
java.lang.Object
org.apache.wss4j.common.kerberos.KerberosContext
Encapsulates Kerberos token (service ticket) and secret key returned by
KerberosClientExceptionAction.
The secret key might be null, in which case it must be obtained from the current subject's
KerberosTicket private credential.- Author:
- bgde
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Destroys all data held in this context instance.byte[]booleanChecks if this context instance is already destroyed.voidsetGssContext(GSSContext gssContext) voidsetKerberosToken(byte[] kerberosToken) voidsetSecretKey(Key secretKey)
-
Constructor Details
-
KerberosContext
public KerberosContext()
-
-
Method Details
-
getKerberosToken
public byte[] getKerberosToken()- Returns:
- The Kerberos service ticket bytes or null they are not available/set.
- Throws:
IllegalStateException- If this context was already disposed.
-
setKerberosToken
public void setKerberosToken(byte[] kerberosToken) -
getSecretKey
- Returns:
- The secret session key, or null if it is not available.
In this case it must be obtained from the current subject's
KerberosTicketprivate credential. - Throws:
IllegalStateException- If this context was already disposed.
-
setSecretKey
-
getGssContext
- Returns:
- The GSSContext as initialized during Kerberos service ticket retrieval.
- Throws:
IllegalStateException- If this context was already disposed.
-
setGssContext
-
dispose
public void dispose()Destroys all data held in this context instance. After calling this method, an attempt to retrieve any field of this context instance will throw an IllegalArgumentException. -
isDisposed
public boolean isDisposed()Checks if this context instance is already destroyed.
-