summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwangxiyuan <wangxiyuan@huawei.com>2017-12-04 15:56:44 +0800
committerwangxiyuan <wangxiyuan@huawei.com>2017-12-05 08:53:08 +0800
commit4af3a43ab2ba5023eb8b4982331e7cff373f59fa (patch)
tree005405a9b4a7e4f9590aada016792ab801aa5618
parent51d5b63a083450468cec474b9b6400df5d977091 (diff)
Correct error message for request token
When create a request token with header "requested_project_id", Keystone raise the 400 error: "Expecting to find requested_project_id in request". The correct key is "Requested-Project-Id" which use - instead of _ This patch correct the misleading error message. Change-Id: I2e619a2e7326d0c84756efbdce36d99b0bfbfc56
Notes
Notes (review): Code-Review+2: Colleen Murphy <colleen@gazlene.net> Code-Review+2: Lance Bragstad <lbragstad@gmail.com> Workflow+1: Lance Bragstad <lbragstad@gmail.com> Code-Review+1: Shuo Liu <liushuobj@inspur.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Wed, 06 Dec 2017 15:01:07 +0000 Reviewed-on: https://review.openstack.org/525088 Project: openstack/keystone Branch: refs/heads/master
-rw-r--r--keystone/oauth1/controllers.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/keystone/oauth1/controllers.py b/keystone/oauth1/controllers.py
index d9eeb56..cffb6eb 100644
--- a/keystone/oauth1/controllers.py
+++ b/keystone/oauth1/controllers.py
@@ -237,7 +237,7 @@ class OAuthControllerV3(controller.V3Controller):
237 attribute='oauth_consumer_key', target='request') 237 attribute='oauth_consumer_key', target='request')
238 if not requested_project_id: 238 if not requested_project_id:
239 raise exception.ValidationError( 239 raise exception.ValidationError(
240 attribute='requested_project_id', target='request') 240 attribute='Requested-Project-Id', target='request')
241 241
242 # NOTE(stevemar): Ensure consumer and requested project exist 242 # NOTE(stevemar): Ensure consumer and requested project exist
243 self.resource_api.get_project(requested_project_id) 243 self.resource_api.get_project(requested_project_id)