Class KrbClient
java.lang.Object
org.apache.kerby.kerberos.kerb.client.KrbClientBase
org.apache.kerby.kerberos.kerb.client.KrbClient
A Krb client API for applications to interact with KDC
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.kerby.kerberos.kerb.type.ticket.TgtTicketrequestTgt(String principal, File keytabFile) Request a TGT with user plain credentialorg.apache.kerby.kerberos.kerb.type.ticket.TgtTicketrequestTgt(String principal, String password) Request a TGT with user plain credentialMethods inherited from class org.apache.kerby.kerberos.kerb.client.KrbClientBase
getCredentialFromFile, getKrbConfig, getSetting, getTgtTicketFromCredential, init, renewTicket, requestSgt, requestSgt, requestSgt, requestTgt, resolveCredCache, setAllowTcp, setAllowUdp, setKdcHost, setKdcRealm, setKdcTcpPort, setKdcUdpPort, setTimeout, storeTicket, storeTicket
-
Constructor Details
-
KrbClient
public KrbClient() throws org.apache.kerby.kerberos.kerb.KrbExceptionDefault constructor.- Throws:
org.apache.kerby.kerberos.kerb.KrbException- e
-
KrbClient
Construct with prepared KrbConfig.- Parameters:
krbConfig- The krb config
-
KrbClient
Constructor with conf dir- Parameters:
confDir- The conf dir- Throws:
org.apache.kerby.kerberos.kerb.KrbException- e
-
-
Method Details
-
requestTgt
public org.apache.kerby.kerberos.kerb.type.ticket.TgtTicket requestTgt(String principal, String password) throws org.apache.kerby.kerberos.kerb.KrbException Request a TGT with user plain credential- Parameters:
principal- The principalpassword- The password- Returns:
- The tgt ticket
- Throws:
org.apache.kerby.kerberos.kerb.KrbException- e
-
requestTgt
public org.apache.kerby.kerberos.kerb.type.ticket.TgtTicket requestTgt(String principal, File keytabFile) throws org.apache.kerby.kerberos.kerb.KrbException Request a TGT with user plain credential- Parameters:
principal- The principalkeytabFile- The keytab file- Returns:
- TGT
- Throws:
org.apache.kerby.kerberos.kerb.KrbException- e
-