String username = session.getId();
String authenticationMethod = "";
try
{
// Set the ThreadLocal association.
negotiationContext.associate();
MessageFactory mf = MessageFactory.newInstance();
if (mf.accepts(authTokenIS) == false)
{
throw new IOException("Unsupported negotiation mechanism.");