public ClientUserAuthServiceNew(Session s) {
if (!(s instanceof ClientSessionImpl)) {
throw new IllegalStateException("Client side service used on server side");
}
session = (ClientSessionImpl) s;
authFuture = new DefaultAuthFuture(session.getLock());
authFactories = session.getFactoryManager().getUserAuthFactories();
clientMethods = new ArrayList<String>();
String prefs = session.getFactoryManager().getProperties().get(ClientFactoryManager.PREFERRED_AUTHS);
if (prefs != null) {
for (String pref : prefs.split(",")) {