diff options
| author | Simo Sorce <simo@redhat.com> | 2015-04-07 22:44:54 -0400 |
|---|---|---|
| committer | Simo Sorce <simo@redhat.com> | 2015-04-08 00:19:20 -0400 |
| commit | f5e002a3d066ed29e5cf4154b6dfa6fd1732785b (patch) | |
| tree | 153344078cecb2fd82e6d089a8e8360b28d43d4c /custodia/httpd/authenticators.py | |
| parent | 0c8c416289514889ec095c203880a8ce1e4c23d4 (diff) | |
| download | custodia-f5e002a3d066ed29e5cf4154b6dfa6fd1732785b.tar.gz custodia-f5e002a3d066ed29e5cf4154b6dfa6fd1732785b.tar.xz custodia-f5e002a3d066ed29e5cf4154b6dfa6fd1732785b.zip | |
Add basic framework for authorization plugins
Diffstat (limited to 'custodia/httpd/authenticators.py')
| -rw-r--r-- | custodia/httpd/authenticators.py | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/custodia/httpd/authenticators.py b/custodia/httpd/authenticators.py index cf8402f..de722e0 100644 --- a/custodia/httpd/authenticators.py +++ b/custodia/httpd/authenticators.py @@ -1,7 +1,6 @@ # Copyright (C) 2015 Custodia Project Contributors - see LICENSE file from custodia.httpd.server import HTTPError -import os class HTTPAuthenticator(object): @@ -62,23 +61,3 @@ class SimpleHeaderAuth(HTTPAuthenticator): request['remote_user'] = value return True - - -class SimpleNULLAuth(HTTPAuthenticator): - - def __init__(self, config=None): - super(SimpleNULLAuth, self).__init__(config) - self.paths = [] - if 'paths' in self.config: - self.paths = self.config['paths'].split() - - def handle(self, request): - path = request.get('path', '') - while path != '': - if path in self.paths: - return True - if path == '/': - path = '' - else: - path, _ = os.path.split(path) - return None |
