Kerberos read KRB5CCNAME environment variable to set ticket cache path

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2074 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2013-03-28 23:13:35 +00:00
parent d808c7c453
commit c81fab0f50
1 changed files with 4 additions and 0 deletions

View File

@ -49,6 +49,10 @@ public class KerberosLoginConfiguration extends Configuration {
clientLoginModuleOptions.put("useTicketCache", "true");
clientLoginModuleOptions.put("renewTGT", "true");
//clientLoginModuleOptions.put("doNotPrompt", "true");
String krb5ccName = System.getenv().get("KRB5CCNAME");
if (krb5ccName != null && krb5ccName.length() > 0) {
clientLoginModuleOptions.put("ticketCache", krb5ccName);
}
//clientLoginModuleOptions.put("ticketCache", FileCredentialsCache.getDefaultCacheName());
//clientLoginModuleOptions.put("refreshKrb5Config", "true");
//clientLoginModuleOptions.put("storeKey", "true");