diff options
author | Prashanth Pai <ppai@redhat.com> | 2013-11-06 17:30:28 +0530 |
---|---|---|
committer | Luis Pabon <lpabon@redhat.com> | 2013-11-17 16:34:11 -0800 |
commit | 991989bc04178442b2a6b766a67f7a26e60c08f0 (patch) | |
tree | e796215fbb45333290fdd293b608235b7f67493c /swiftkerbauth/kerbauth.py | |
parent | f64a3354185f32928e2568d9ece4a52fa4746c05 (diff) |
Modularize swift-auth CGI script, add unit tests
- Moved most of swift-auth CGI script to kerbauth_utils.py
- Added unit tests for kerbauth_utils.py
- Made MEMCACHE_SERVERS, DEBUG_HEADERS, TOKEN_LIFE as
configurable parameters
Change-Id: I2e9e9823e8aa99dc2cf41327c55428350c8768dc
Signed-off-by: Prashanth Pai <ppai@redhat.com>
Reviewed-on: http://review.gluster.org/6248
Tested-by: Chetan Risbud <crisbud@redhat.com>
Reviewed-by: Chetan Risbud <crisbud@redhat.com>
Reviewed-by: Luis Pabon <lpabon@redhat.com>
Tested-by: Luis Pabon <lpabon@redhat.com>
Diffstat (limited to 'swiftkerbauth/kerbauth.py')
-rw-r--r-- | swiftkerbauth/kerbauth.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/swiftkerbauth/kerbauth.py b/swiftkerbauth/kerbauth.py index 612299d..a1ba091 100644 --- a/swiftkerbauth/kerbauth.py +++ b/swiftkerbauth/kerbauth.py @@ -17,12 +17,8 @@ from traceback import format_exc from eventlet import Timeout from swift.common.swob import Request -from swift.common.swob import HTTPBadRequest, HTTPForbidden, HTTPNotFound - -try: - from swift.common.swob import HTTPSeeOther -except ImportError: - from swift.common.swob import HTTPFound as HTTPSeeOther +from swift.common.swob import HTTPBadRequest, HTTPForbidden, HTTPNotFound, \ + HTTPSeeOther from swift.common.middleware.acl import clean_acl, parse_acl, referrer_allowed from swift.common.utils import cache_from_env, get_logger, \ |