public class KrbClientBase extends Object
| Constructor and Description |
|---|
KrbClientBase()
Default constructor.
|
KrbClientBase(File confDir)
Constructor with conf dir
|
KrbClientBase(KrbClientBase krbClient)
Constructor with prepared KrbClientBase.
|
KrbClientBase(KrbConfig krbConfig)
Construct with prepared KrbConfig.
|
| Modifier and Type | Method and Description |
|---|---|
KrbConfig |
getKrbConfig() |
KrbSetting |
getSetting()
Get krb client settings from options and configs.
|
void |
init()
Init the client.
|
SgtTicket |
requestSgt(org.apache.kerby.KOptions requestOptions)
Request a service ticket provided request options
|
SgtTicket |
requestSgt(TgtTicket tgt,
String serverPrincipal)
Request a service ticket with a TGT targeting for a server
|
TgtTicket |
requestTgt(org.apache.kerby.KOptions requestOptions)
Request a TGT with using well prepared requestOptions.
|
void |
setAllowTcp(boolean allowTcp)
Set to allow TCP or not.
|
void |
setAllowUdp(boolean allowUdp)
Set to allow UDP or not.
|
void |
setKdcHost(String kdcHost)
Set KDC host.
|
void |
setKdcRealm(String realm)
Set KDC realm for ticket request
|
void |
setKdcTcpPort(int kdcTcpPort)
Set KDC tcp port.
|
void |
setKdcUdpPort(int kdcUdpPort)
Set KDC udp port.
|
void |
setTimeout(int timeout)
Set time out for connection
|
void |
storeTicket(TgtTicket tgtTicket,
File ccacheFile)
Store tgt into the specified credential cache file.
|
public KrbClientBase()
throws KrbException
KrbException - epublic KrbClientBase(KrbConfig krbConfig)
krbConfig - The krb configpublic KrbClientBase(File confDir) throws KrbException
confDir - The conf dirKrbException - epublic KrbClientBase(KrbClientBase krbClient)
krbClient - The krb clientpublic void setKdcRealm(String realm)
realm - The realmpublic void setKdcHost(String kdcHost)
kdcHost - The kdc hostpublic void setKdcTcpPort(int kdcTcpPort)
kdcTcpPort - The kdc tcp portpublic void setAllowUdp(boolean allowUdp)
allowUdp - true if allow udppublic void setAllowTcp(boolean allowTcp)
allowTcp - true if allow tcppublic void setKdcUdpPort(int kdcUdpPort)
kdcUdpPort - The kdc udp portpublic void setTimeout(int timeout)
timeout - in secondspublic void init()
throws KrbException
KrbException - epublic KrbSetting getSetting()
public KrbConfig getKrbConfig()
public TgtTicket requestTgt(org.apache.kerby.KOptions requestOptions) throws KrbException
requestOptions - The request optionsKrbException - epublic SgtTicket requestSgt(TgtTicket tgt, String serverPrincipal) throws KrbException
tgt - The tgt ticketserverPrincipal - The server principalKrbException - epublic SgtTicket requestSgt(org.apache.kerby.KOptions requestOptions) throws KrbException
requestOptions - The request optionsKrbException - epublic void storeTicket(TgtTicket tgtTicket, File ccacheFile) throws KrbException
tgtTicket - The tgt ticketccacheFile - The credential cache fileKrbException - eCopyright © 2014–2016 The Apache Software Foundation. All rights reserved.