int count = hooks.size();
for (int i = 0; i < count; i++) {
AuthHook rawHook = hooks.get(i);
session.getLogger().debug("executing hook " + rawHook);
HookResult hRes = rawHook.doAuth(session, user, pass);
if (rHooks != null) {
for (int i2 = 0; i2 < rHooks.size(); i2++) {
Object rHook = rHooks.get(i2);
session.getLogger().debug("executing hook " + rHook);