@Test public void loginUsingTicket() throws Exception { File keytabFile = generateKeytab(keytabFileName, principal); TgtTicket tgtTicket = kdcServer.getKrbClient().requestTgt(principal, keytabFile); File ticketCacheFile = new File(ticketCacheFileName); kdcServer.getKrbClient().storeTicket(tgtTicket, ticketCacheFile); Subject subject = SecurityUtil.loginUsingTicketCache(principal, ticketCacheFileName); Assert.assertEquals(principal, subject.getPrincipals().iterator().next().getName()); System.out.println("Login successful for user: " + subject.getPrincipals().iterator().next()); }
public static Subject loginUsingTicketCache(String principal) throws IOException { String ticketCache = System.getenv("KRB5CCNAME"); return loginUsingTicketCache(principal, ticketCache); }
SecurityUtil { public static Subject loginUsingTicketCache(String principal) throws IOException { String ticketCache = System.getenv("KRB5CCNAME"); return loginUsingTicketCache(principal, ticketCache); } }
SecurityUtil { public static Subject loginUsingTicketCache(String principal) throws IOException { String ticketCache = System.getenv("KRB5CCNAME"); return loginUsingTicketCache(principal, ticketCache); }  }
SecurityUtil { public static Subject loginUsingTicketCache(String principal) throws IOException { String ticketCache = System.getenv("KRB5CCNAME"); return loginUsingTicketCache(principal, ticketCache); }  static synchronized Subject loginUserFromTgtTicket(String smartSecurity); static Subject loginUsingTicketCache(String principal); static void loginUsingKeytab(SmartConf conf); static void loginUsingKeytab(String keytabFilename, String principal); static Subject loginUsingKeytab(
      String principal, File keytabFile); static Configuration useTicketCache(String principal, String ticketCacheFileName); static Configuration useKeytab(String principal, File keytabFile); static boolean isSecurityEnabled(SmartConf conf); }
SecurityUtil { public static Subject loginUsingTicketCache(String principal) throws IOException { String ticketCache = System.getenv("KRB5CCNAME"); return loginUsingTicketCache(principal, ticketCache); }  static synchronized Subject loginUserFromTgtTicket(String smartSecurity); static Subject loginUsingTicketCache(String principal); static void loginUsingKeytab(SmartConf conf); static void loginUsingKeytab(String keytabFilename, String principal); static Subject loginUsingKeytab(
      String principal, File keytabFile); static Configuration useTicketCache(String principal, String ticketCacheFileName); static Configuration useKeytab(String principal, File keytabFile); static boolean isSecurityEnabled(SmartConf conf); static final Logger LOG; static final boolean ENABLE_DEBUG; }