summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Kajinami <tkajinam@redhat.com>2021-08-21 20:19:48 +0900
committerTakashi Kajinami <tkajinam@redhat.com>2021-10-25 22:06:32 +0900
commit8e47bfc77c37610e0da577f13d7a3eb7894139a0 (patch)
tree8fb07ea78d88047ae0e0079d6c90d3e13623e4d1
parentda7987ca926e9bd82ff2989a920ea9740da24f95 (diff)
downloadoslo-middleware-8e47bfc77c37610e0da577f13d7a3eb7894139a0.tar.gz
Add paste.filter_factory entrypoint for basic auth middleware
... so that the middleware can be loaded using the python egg instead of the direct path. Closes-Bug: #1940738 Change-Id: I57408766c120d2c9784f3886457e91ee7d30de1b
-rw-r--r--oslo_middleware/__init__.py4
-rw-r--r--setup.cfg1
2 files changed, 4 insertions, 1 deletions
diff --git a/oslo_middleware/__init__.py b/oslo_middleware/__init__.py
index ea1c12d..3966cde 100644
--- a/oslo_middleware/__init__.py
+++ b/oslo_middleware/__init__.py
@@ -10,7 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-__all__ = ['CatchErrors',
+__all__ = ['BasicAuthMiddleware',
+ 'CatchErrors',
'CorrelationId',
'CORS',
'Debug',
@@ -20,6 +21,7 @@ __all__ = ['CatchErrors',
'RequestBodySizeLimiter',
'SSLMiddleware']
+from oslo_middleware.basic_auth import BasicAuthMiddleware
from oslo_middleware.catch_errors import CatchErrors
from oslo_middleware.correlation_id import CorrelationId
from oslo_middleware.cors import CORS
diff --git a/setup.cfg b/setup.cfg
index de5689a..68d3515 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -42,6 +42,7 @@ paste.app_factory =
healthcheck = oslo_middleware:Healthcheck.app_factory
paste.filter_factory =
+ basic_auth = oslo_middleware:BasicAuthMiddleware.factory
catch_errors = oslo_middleware:CatchErrors.factory
correlation_id = oslo_middleware:CorrelationId.factory
cors = oslo_middleware:CORS.factory