Module jcifs

Class KerberosCredentials

java.lang.Object
org.codelibs.jcifs.smb.pac.kerberos.KerberosCredentials

public class KerberosCredentials extends Object
Kerberos credentials management class that handles authentication through JAAS.
  • Constructor Details

    • KerberosCredentials

      public KerberosCredentials() throws LoginException
      Creates KerberosCredentials using the default JAAS configuration.
      Throws:
      LoginException - if authentication fails
    • KerberosCredentials

      public KerberosCredentials(String loginContextName) throws LoginException
      Creates KerberosCredentials using the specified JAAS login context.
      Parameters:
      loginContextName - the name of the JAAS login context
      Throws:
      LoginException - if authentication fails
  • Method Details

    • getKeys

      public KerberosKey[] getKeys()
      Retrieves all Kerberos keys from the authenticated subject.
      Returns:
      array of KerberosKey objects
    • getKey

      public KerberosKey getKey(int keyType)
      Retrieves a specific Kerberos key by key type.
      Parameters:
      keyType - the encryption type of the key to retrieve
      Returns:
      the KerberosKey with the specified type, or null if not found
    • getSubject

      public Subject getSubject()
      Returns the authenticated JAAS Subject.
      Returns:
      the authenticated Subject