}
service = principals.iterator().next().getName();
}
// Validate the ticket
KerberosServiceAction action = new KerberosServiceAction(token, service);
Principal principal = (Principal)Subject.doAs(subject, action);
if (principal == null) {
throw new WSSecurityException(
WSSecurityException.FAILURE, "kerberosTicketValidationError"
);