@Override public Account getAuthenticatedAccount() { return currentSession != null ? currentSession.getAuthenticatedAccount() : null; }
private Account performAuthentication() { final Iterator<AuthenticationMechanism> iterator = rule.mechanisms().iterator(); Account account = getCurrentSession().getAuthenticatedAccount(); while ( account == null && iterator.hasNext() ) { currentAuthMechanism = iterator.next(); account = currentAuthMechanism.authenticate( exchange, rule.identityManagers(), getCurrentSession() ); } return account; }