@Override public AuthenticationHandlerResponse authenticate(final AuthenticationCriteria ac) throws LdapException { logger.debug("authenticate criteria={}", ac); AuthenticationHandlerResponse response = null; final Connection conn = getConnection(); boolean closeConn = false; try { response = authenticateInternal(conn, ac); } catch (LdapException | RuntimeException e) { closeConn = true; throw e; } finally { if (closeConn) { conn.close(); } } logger.debug("authenticate response={} for criteria={}", response, ac); return response; }
/** * Combines request controls in the {@link AuthenticationRequest} with {@link #authenticationControls}. * * @param criteria containing request controls * * @return combined request controls or null */ protected RequestControl[] processRequestControls(final AuthenticationCriteria criteria) { final RequestControl[] ctls; if (criteria.getAuthenticationRequest().getControls() != null) { if (getAuthenticationControls() != null) { ctls = LdapUtils.concatArrays(criteria.getAuthenticationRequest().getControls(), getAuthenticationControls()); } else { ctls = criteria.getAuthenticationRequest().getControls(); } } else { ctls = getAuthenticationControls(); } return ctls; } }
/** * Combines request controls in the {@link AuthenticationRequest} with {@link #authenticationControls}. * * @param criteria containing request controls * * @return combined request controls or null */ protected RequestControl[] processRequestControls(final AuthenticationCriteria criteria) { final RequestControl[] ctls; if (criteria.getAuthenticationRequest().getControls() != null) { if (getAuthenticationControls() != null) { ctls = LdapUtils.concatArrays(criteria.getAuthenticationRequest().getControls(), getAuthenticationControls()); } else { ctls = criteria.getAuthenticationRequest().getControls(); } } else { ctls = getAuthenticationControls(); } return ctls; } }
@Override public AuthenticationHandlerResponse authenticate(final AuthenticationCriteria ac) throws LdapException { logger.debug("authenticate criteria={}", ac); AuthenticationHandlerResponse response = null; final Connection conn = getConnection(); boolean closeConn = false; try { response = authenticateInternal(conn, ac); } catch (LdapException | RuntimeException e) { closeConn = true; throw e; } finally { if (closeConn) { conn.close(); } } logger.debug("authenticate response={} for criteria={}", response, ac); return response; }
@Override public AuthenticationHandlerResponse authenticate(final AuthenticationCriteria ac) throws LdapException { logger.debug("authenticate criteria={}", ac); AuthenticationHandlerResponse response = null; final Connection conn = getConnection(); boolean closeConn = false; try { response = authenticateInternal(conn, ac); } catch (LdapException | RuntimeException e) { closeConn = true; throw e; } finally { if (closeConn) { conn.close(); } } logger.debug("authenticate response={} for criteria={}", response, ac); return response; }