code: public static GSSCredential getCredential(Subject subject) {
  	if (subject == null) {
  	    return null;
  	}
  	Set gssCreds = subject.getPrivateCredentials(GSSCredential.class);
  	if (gssCreds == null) {
  	    return null;
  	}
  	Iterator iter = gssCreds.iterator();
  	return (iter.hasNext()) ?
  	    (GSSCredential)iter.next() :
  	    null;
      }
docs: Retrieves the first <code>GSSCredential</code> from the
  private credential set of the specified <code>Subject</code>
  object.
  
  @return the <code>GSSCredential</code>. Might be null.