if (!targetName.equals(tokenTargetName)) throw new SASException(2);
String userName = Util.extractUserNameFromScopedName(token.username);
LoginContext context = ContextManager.login(tokenTargetName,
new UsernamePasswordCallback(userName,
new String(token.password, "UTF8").toCharArray()));
result = context.getSubject();
}
} catch (UnsupportedEncodingException e) {
throw new SASException(1, e);