/** * Store sgt into the specified credential cache file. * @param sgtTicket The sgt ticket * @param ccacheFile The credential cache file * @throws KrbException e */ public void renewTicket(SgtTicket sgtTicket, File ccacheFile) throws KrbException { LOG.info("Renewing the ticket to the credential cache file."); if (!ccacheFile.exists()) { createCacheFile(ccacheFile); } if (ccacheFile.exists() && ccacheFile.canWrite()) { CredentialCache cCache = new CredentialCache(sgtTicket); try { cCache.store(ccacheFile); } catch (IOException e) { throw new KrbException("Failed to renew ticket", e); } } else { throw new IllegalArgumentException("Invalid ccache file, " + "not exist or writable: " + ccacheFile.getAbsolutePath()); } }
/** * Store tgt into the specified credential cache file. * @param tgtTicket The tgt ticket * @param ccacheFile The credential cache file * @throws KrbException e */ public void storeTicket(TgtTicket tgtTicket, File ccacheFile) throws KrbException { LOG.info("Storing the tgt to the credential cache file."); if (!ccacheFile.exists()) { createCacheFile(ccacheFile); } if (ccacheFile.exists() && ccacheFile.canWrite()) { CredentialCache cCache = new CredentialCache(tgtTicket); try { cCache.store(ccacheFile); } catch (IOException e) { throw new KrbException("Failed to store tgt", e); } } else { throw new IllegalArgumentException("Invalid ccache file, " + "not exist or writable: " + ccacheFile.getAbsolutePath()); } }
/** * Store tgt into the specified credential cache file. * @param tgtTicket The tgt ticket * @param ccacheFile The credential cache file * @throws KrbException e */ public void storeTicket(TgtTicket tgtTicket, File ccacheFile) throws KrbException { LOG.info("Storing the tgt to the credential cache file."); if (!ccacheFile.exists()) { createCacheFile(ccacheFile); } if (ccacheFile.exists() && ccacheFile.canWrite()) { CredentialCache cCache = new CredentialCache(tgtTicket); try { cCache.store(ccacheFile); } catch (IOException e) { throw new KrbException("Failed to store tgt", e); } } else { throw new IllegalArgumentException("Invalid ccache file, " + "not exist or writable: " + ccacheFile.getAbsolutePath()); } }
/** * Store sgt into the specified credential cache file. * @param sgtTicket The sgt ticket * @param ccacheFile The credential cache file * @throws KrbException e */ public void renewTicket(SgtTicket sgtTicket, File ccacheFile) throws KrbException { LOG.info("Renewing the ticket to the credential cache file."); if (!ccacheFile.exists()) { createCacheFile(ccacheFile); } if (ccacheFile.exists() && ccacheFile.canWrite()) { CredentialCache cCache = new CredentialCache(sgtTicket); try { cCache.store(ccacheFile); } catch (IOException e) { throw new KrbException("Failed to renew ticket", e); } } else { throw new IllegalArgumentException("Invalid ccache file, " + "not exist or writable: " + ccacheFile.getAbsolutePath()); } }
createCacheFile(ccacheFile);
createCacheFile(ccacheFile);