com.dstc.security.kerberos
Class KerberosContext

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

public final class KerberosContext
extends Object

A class representing the context for 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()
           
 int getDefaultTicketLifeTime()
          Returns the default ticket lifetime for all ticket requests.
 InetAddress getKDCAddress()
           
 int getKDCPort()
          Returns the KDC port to use
 KeyTab getKeyTab()
           
 PrincipalName getPrincipalName()
           
 String getRealm()
           
 int[] getSupportedEncryptionTypes()
          Returns the supported encryption types
 void setCredentialStore(CredentialStore store)
          Sets the CredentialStore to use
 void setDefaultTicketLifeTime(int hours)
          Sets the default ticket lifetime in all ticket requests.
 void setKDCAddress(InetAddress add)
          Sets the KDC host to use
 void setKDCPort(int port)
          Sets the KDC port to use.
 void setKeyTab(KeyTab keytab)
          Sets the KeyTab to use
 void setPrincipalName(PrincipalName name)
           
 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 to use

getKDCAddress

public InetAddress getKDCAddress()

setKDCPort

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

getKDCPort

public int getKDCPort()
Returns the KDC port to use

setPrincipalName

public void setPrincipalName(PrincipalName name)

getPrincipalName

public PrincipalName getPrincipalName()

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()

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 to use

getCredentialStore

public CredentialStore getCredentialStore()

setKeyTab

public void setKeyTab(KeyTab keytab)
Sets the KeyTab to use

getKeyTab

public KeyTab getKeyTab()