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