com.dstc.security.kerberos
Class KerberosContext

java.lang.Object
  |
  +--com.dstc.security.kerberos.KerberosContext

public final class KerberosContext
extends Object

A class for storing contextual information required by a Kerberos instance.


Constructor Summary
KerberosContext(String realm, PrincipalName name, InetAddress kdc)
          Constructs a KerberosContext valid for the given realm, principal and KDC address
 
Method Summary
 CredentialStore getCredentialStore()
          Returns the CredentialStore for this context
 int getDefaultTicketLifeTime()
          Returns the default ticket lifetime for all ticket requests.
 InetAddress getKDCAddress()
          Returns the KDC host address
 int getKDCPort()
          Returns the KDC port
 KeyTab getKeyTab()
          Returns the KeyTab for this context
 PrincipalName getPrincipalName()
          Returns the principal name valid for the current context
 String getRealm()
          Returns the local realm
 int[] getSupportedEncryptionTypes()
          Returns the supported encryption types
 void setCredentialStore(CredentialStore store)
          Sets the CredentialStore for this context
 void setDefaultTicketLifeTime(int hours)
          Sets the default ticket lifetime in all ticket requests.
 void setKDCAddress(InetAddress add)
          Sets the KDC host address
 void setKDCPort(int port)
          Sets the KDC port.
 void setKeyTab(KeyTab keytab)
          Sets the KeyTab for this context
 void setPrincipalName(PrincipalName name)
          Sets the principal name valid for the current context
 void setRealm(String realm)
          Sets the local realm
 void setSupportedEncryptionTypes(int[] eTypes)
          Sets the supported encryption types.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KerberosContext

public KerberosContext(String realm,
                       PrincipalName name,
                       InetAddress kdc)
Constructs a KerberosContext valid for the given realm, principal and KDC address
Method Detail

setKDCAddress

public void setKDCAddress(InetAddress add)
Sets the KDC host address

getKDCAddress

public InetAddress getKDCAddress()
Returns the KDC host address

setKDCPort

public void setKDCPort(int port)
Sets the KDC port. If not set explicitly this defaults to the standard Kerberos port 88.

getKDCPort

public int getKDCPort()
Returns the KDC port

setPrincipalName

public void setPrincipalName(PrincipalName name)
Sets the principal name valid for the current context

getPrincipalName

public PrincipalName getPrincipalName()
Returns the principal name valid for the current context

setSupportedEncryptionTypes

public void setSupportedEncryptionTypes(int[] eTypes)
Sets the supported encryption types. If not set explicitly it defaults to the ordered pair (DES_CBC_MD5, DES_CBC_CRC)

getSupportedEncryptionTypes

public int[] getSupportedEncryptionTypes()
Returns the supported encryption types

setRealm

public void setRealm(String realm)
Sets the local realm

getRealm

public String getRealm()
Returns the local realm

setDefaultTicketLifeTime

public void setDefaultTicketLifeTime(int hours)
Sets the default ticket lifetime in all ticket requests. If not set explicitly it defaults to 10 hours

getDefaultTicketLifeTime

public int getDefaultTicketLifeTime()
Returns the default ticket lifetime for all ticket requests.

setCredentialStore

public void setCredentialStore(CredentialStore store)
Sets the CredentialStore for this context

getCredentialStore

public CredentialStore getCredentialStore()
Returns the CredentialStore for this context

setKeyTab

public void setKeyTab(KeyTab keytab)
Sets the KeyTab for this context

getKeyTab

public KeyTab getKeyTab()
Returns the KeyTab for this context