From ab5ee2d4ce27ec1e0efb8e41957bda50cedae187 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Fri, 12 Apr 2013 09:00:23 +0000
Subject: [PATCH] OPENDJ-830 (CR-1538) Implement authentication and authorization for HTTP connection handler
---
opends/src/server/org/opends/server/protocols/http/HTTPConnectionHandler.java | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/opends/src/server/org/opends/server/protocols/http/HTTPConnectionHandler.java b/opends/src/server/org/opends/server/protocols/http/HTTPConnectionHandler.java
index 2ac6020..725fce2 100644
--- a/opends/src/server/org/opends/server/protocols/http/HTTPConnectionHandler.java
+++ b/opends/src/server/org/opends/server/protocols/http/HTTPConnectionHandler.java
@@ -186,6 +186,20 @@
super(DEFAULT_FRIENDLY_NAME);
}
+ /**
+ * Returns whether unauthenticated HTTP requests are allowed. The server
+ * checks whether unauthenticated requests are allowed server-wide first then
+ * for the HTTP Connection Handler second.
+ *
+ * @return true if unauthenticated requests are allowed, false otherwise.
+ */
+ public boolean acceptUnauthenticatedRequests()
+ {
+ // the global setting overrides the more specific setting here.
+ return !DirectoryServer.rejectUnauthenticatedRequests()
+ && !this.currentConfig.isAuthenticationRequired();
+ }
+
/** {@inheritDoc} */
@Override
public ConfigChangeResult applyConfigurationChange(
--
Gitblit v1.10.0