org.apache.ws.security.message.token
Class KerberosContext
java.lang.Object
org.apache.ws.security.message.token.KerberosContext
public class KerberosContext
- extends Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KerberosContext
public KerberosContext()
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
public Key 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
KerberosTicket
private credential.
- Throws:
IllegalStateException
- If this context was already disposed.- See Also:
javax.security.auth.kerberos.KerberosTicket#getSessionKey()}
setSecretKey
public void setSecretKey(Key secretKey)
getGssContext
public GSSContext getGssContext()
- Returns:
- The GSSContext as initialized during Kerberos service ticket retrieval.
- Throws:
IllegalStateException
- If this context was already disposed.
setGssContext
public void setGssContext(GSSContext gssContext)
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.
- Returns:
Copyright © 2004–2015 The Apache Software Foundation. All rights reserved.