/** * Set KDC realm for ticket request * @param realm The realm */ public void setKdcRealm(String realm) { commonOptions.add(KrbOption.KDC_REALM, realm); }
/** * Set to allow TCP or not. * @param allowTcp true if allow tcp */ public void setAllowTcp(boolean allowTcp) { commonOptions.add(KrbOption.ALLOW_TCP, allowTcp); }
/** * Set to allow UDP or not. * @param allowUdp true if allow udp */ public void setAllowUdp(boolean allowUdp) { startupOptions.add(KdcServerOption.ALLOW_UDP, allowUdp); }
/** * Allow to hook customized kdc implementation. * * @param innerKdcImpl The inner kdc implementation */ public void setInnerKdcImpl(InternalKdcServer innerKdcImpl) { startupOptions.add(KdcServerOption.INNER_KDC_IMPL, innerKdcImpl); }
/** * Set to allow UDP or not. * @param allowUdp true if allow udp */ public void setAllowUdp(boolean allowUdp) { commonOptions.add(AdminOption.ALLOW_UDP, allowUdp); }
/** * Set to allow TCP or not. * @param allowTcp true if allow tcp */ public void setAllowTcp(boolean allowTcp) { commonOptions.add(AdminOption.ALLOW_TCP, allowTcp); }
/** * Set time out for connection * @param timeout in seconds */ public void setTimeout(int timeout) { commonOptions.add(AdminOption.CONN_TIMEOUT, timeout); }
/** * Set time out for connection * @param timeout in seconds */ public void setTimeout(int timeout) { commonOptions.add(KrbOption.CONN_TIMEOUT, timeout); }
/** * Set runtime folder. * @param workDir The work dir */ public void setWorkDir(File workDir) { startupOptions.add(KdcServerOption.WORK_DIR, workDir); }
/** * Allow to debug so have more logs. */ public void enableDebug() { startupOptions.add(KdcServerOption.ENABLE_DEBUG); }
/** * Set Admin udp port. Only makes sense when allowUdp is set. * @param adminUdpPort The admin udp port */ public void setAdminUdpPort(int adminUdpPort) { startupOptions.add(AdminServerOption.ADMIN_UDP_PORT, adminUdpPort); }
/** * Set time out for connection * @param timeout in seconds */ public void setTimeout(int timeout) { commonOptions.add(KrbOption.CONN_TIMEOUT, timeout); }
/** * Set Admin udp port. Only makes sense when allowUdp is set. * @param adminUdpPort The admin udp port */ public void setAdminUdpPort(int adminUdpPort) { startupOptions.add(AdminServerOption.ADMIN_UDP_PORT, adminUdpPort); }
/** * Set to allow UDP or not. * @param allowUdp true if allow udp */ public void setAllowUdp(boolean allowUdp) { startupOptions.add(KdcServerOption.ALLOW_UDP, allowUdp); }
/** * Allow to debug so have more logs. */ public void enableDebug() { startupOptions.add(KdcServerOption.ENABLE_DEBUG); }
/** * Set to allow TCP or not. * @param allowTcp true if allow tcp */ public void setAllowTcp(boolean allowTcp) { commonOptions.add(AdminOption.ALLOW_TCP, allowTcp); }
/** * Set KDC udp port. Only makes sense when allowUdp is set. * @param kdcUdpPort The kdc udp port */ public void setKdcUdpPort(int kdcUdpPort) { if (kdcUdpPort < 1) { throw new IllegalArgumentException("Invalid port"); } commonOptions.add(KrbOption.KDC_UDP_PORT, kdcUdpPort); setAllowUdp(true); }
public void add(KOption option, Object optionValue) { if (option != null) { option.getOptionInfo().setValue(optionValue); add(option); } }
@Override public KOptions getPreauthOptions() { KOptions results = super.getPreauthOptions(); KOptions krbOptions = getRequestOptions(); results.add(krbOptions.getOption(TokenOption.USE_TOKEN)); results.add(krbOptions.getOption(TokenOption.USER_ID_TOKEN)); //results.add(krbOptions.getOption(KrbOption.USER_AC_TOKEN)); return results; } }