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

Jean-Noel Rouvignac
23.13.2013 202b9cdeebbd40337f0de6ae106d6b5293d1ea46
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
commit202b9cdeebbd40337f0de6ae106d6b5293d1ea46
tree 1c82749c619aa863fcfed0385116861dc23e697b tree | zip | gz
parent 76703e9244c5143299ce4f13509292635f8c0ade 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
opends/src/server/org/opends/server/protocols/http/CollectClientConnectionsFilter.java 294 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/protocols/http/SdkConnectionAdapter.java 4 ●●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/protocols/http/CollectClientConnectionsFilterTest.java 20 ●●●●● diff | view | raw | blame | history