summaryrefslogtreecommitdiffstats
path: root/keystone/middleware
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-03-22 16:10:59 +0000
committerGerrit Code Review <review@openstack.org>2013-03-22 16:10:59 +0000
commit09811ecce51a602ee92422b7ea69b93f15796523 (patch)
tree56b66fe4751fd09d9f2429f4df5419fec648ba12 /keystone/middleware
parentbd30a7f37575296429aaa42c0fb148e65c992c12 (diff)
parentad7e1c26414b8fb1016c86eeffbbf85111df9a15 (diff)
downloadkeystone-09811ecce51a602ee92422b7ea69b93f15796523.tar.gz
keystone-09811ecce51a602ee92422b7ea69b93f15796523.tar.xz
keystone-09811ecce51a602ee92422b7ea69b93f15796523.zip
Merge "Rework S3Token middleware tests."
Diffstat (limited to 'keystone/middleware')
-rw-r--r--keystone/middleware/s3_token.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/keystone/middleware/s3_token.py b/keystone/middleware/s3_token.py
index 6c39b9d5..74be5864 100644
--- a/keystone/middleware/s3_token.py
+++ b/keystone/middleware/s3_token.py
@@ -85,15 +85,14 @@ class S3Token(object):
def _json_request(self, creds_json):
headers = {'Content-Type': 'application/json'}
-
+ if self.auth_protocol == 'http':
+ conn = self.http_client_class(self.auth_host, self.auth_port)
+ else:
+ conn = self.http_client_class(self.auth_host,
+ self.auth_port,
+ self.key_file,
+ self.cert_file)
try:
- if self.auth_protocol == 'http':
- conn = self.http_client_class(self.auth_host, self.auth_port)
- else:
- conn = self.http_client_class(self.auth_host,
- self.auth_port,
- self.key_file,
- self.cert_file)
conn.request('POST', '/v2.0/s3tokens',
body=creds_json,
headers=headers)