if( gsse.getMajor() == GSSException.NO_CRED )
throw new CredentialsNotAvailableException(gsse.getMessage(),gsse);
if( gsse.getMajor() == GSSException.DEFECTIVE_TOKEN
|| gsse.getMajor() == GSSException.DUPLICATE_TOKEN
|| gsse.getMajor() == GSSException.OLD_TOKEN )
throw new AuthChallengeException(gsse.getMessage(),gsse);
// other error
throw new AuthenticationException(gsse.getMessage());
}
return "Negotiate " + new String(new Base64().encode(token));
}