mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noel Rouvignac
23.13.2013 a254bd2cc5c027bd79d1380e0e8364b4b688f93e
refs
author Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Tuesday, April 23, 2013 15:13 +0200
committer Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Tuesday, April 23, 2013 15:13 +0200
commita254bd2cc5c027bd79d1380e0e8364b4b688f93e
tree bd0885202d5a1204552487920d6f260d2b648659 tree | zip | gz
parent 22f3000e2a23299031d66ecc4421947d9f4d3815 view | diff
OPENDJ-830 (CR-1591) Implement authentication and authorization for HTTP connection handler

Implemented the authentication steps (search username + bind) in an async way.

CollectClientConnectionsFilter.java:
Added inner classes HTTPRequestContext, DoBindResultHandler and CallDoFilterResultHandler to support async processing.
In doFilter(), built the HTTPRequestContext + removed some local parameters.
Extracted the methods doFilter(HTTPRequestContext, AuthenticationInfo), sendAuthenticationFailure() and onFailure() from doFilter(ServletRequest, ServletResponse, FilterChain).
In several methods, replaced several parameters by using just one HTTPRequestContext parameter.
Extracted method buildSearchRequest(String) from searchUniqueEntryDN().
Removed getAuthenticationInfo() and added the code back to doFilter().
Removed authenticate(), searchUniqueEntryDN() and bind(), and moved their corresponding code to the inner classes.
Added getAsyncContext().

CollectClientConnectionsFilter.java:
Removed the test for authenticate()

SdkConnectionAdapter.java:
Fixed two bugs
3 files modified
318 ■■■■■ changed files
opendj-sdk/opends/src/server/org/opends/server/protocols/http/CollectClientConnectionsFilter.java 294 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/protocols/http/SdkConnectionAdapter.java 4 ●●●● diff | view | raw | blame | history
opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/protocols/http/CollectClientConnectionsFilterTest.java 20 ●●●●● diff | view | raw | blame | history