Raise keystone.exception for HTTP 401 (bug 962563)
Change-Id: I22e3b6769c69ef5917028980007d3295fed99fb7
This commit is contained in:
parent
b1336b0a39
commit
1b7aa15ae4
|
@ -25,6 +25,7 @@ import hmac
|
|||
from hashlib import sha1
|
||||
|
||||
from keystone import config
|
||||
from keystone import exception
|
||||
from keystone.common import utils
|
||||
from keystone.common import wsgi
|
||||
from keystone.contrib import ec2
|
||||
|
@ -49,4 +50,4 @@ class S3Controller(ec2.Ec2Controller):
|
|||
signed = base64.encodestring(hmac.new(key, msg, sha1).digest()).strip()
|
||||
|
||||
if not utils.auth_str_equal(credentials['signature'], signed):
|
||||
raise Exception('Not Authorized')
|
||||
raise exception.Unauthorized()
|
||||
|
|
Loading…
Reference in New Issue