Imported Google Group message. Original thread at: Redirecting to Google Groups Import Date: 2016-01-19 21:16:41 +0000.
Sender:S. Alexander Zaman
.
Date:Thursday, 25 June 2015 19:27:09 UTC+1.
Hi Martin,
I am having a bit of trouble getting the /oauth/token call to respond. I looked at Aaron Parecki Oauth guide that you recommended and have been trying to follow the advice from the following discussion.
Do you know what might be going wrong here?
To test I’m using postman.
- I call the authorize-client call to get a token
===REQUEST===
POST /db7c60750d8f4bc1628285c9327cd5cd/tyk/oauth/authorize-client/ HTTP/1.1
Host: {{GATEWAY SERVER}}
x-tyk-authorization: 352d20ee67be67f6340b4c0605b044b7
Cache-Control: no-cache
Postman-Token: 3d85fde1-ad9a-fa04-b57a-9b341a455259
Content-Type: application/x-www-form-urlencoded
client_id=77458a6996ba4ae94ea028644d070763
&response_type=code
&redirect_uri=http%3A%2F%2Fhttpbin.org%2Fpost
&key_rules=%7B+++++%22allowance%22%3A+999%2C+++++%22rate%22%3A+1000%2C+++++%22per%22%3A+60%2C+++++%22expires%22%3A+0%2C+++++%22quota_max%22%3A±1%2C+++++%22quota_renews%22%3A+1406121006%2C+++++%22quota_remaining%22%3A+0%2C+++++%22quota_renewal_rate%22%3A+60%7D
===RESPONSE===
{“code”:“KOKf4uDdQ5uMF__rPRNZXw”,“redirect_to”:“http://httpbin.org/post?code=KOKf4uDdQ5uMF__rPRNZXw”}
-
I went to a base_url converter (https://jsfiddle.net/gabrieleromanato/qaght/) to convert the string “{{client_id}}{{client_secret}}” to base64.
-
I tried to make the following oauth/token call and got an invalid response
=== REQUEST===
POST /db7c60750d8f4bc1628285c9327cd5cd/oauth/token HTTP/1.1
Host: {{GATEWAY SERVER}}
Authorization: Basic Nzc0NThhNjk5NmJhNGFlOTRlYTAyODY0NGQwNzA3NjNNekExTVRFd016RXRNalUzTWkwME5qWXlMVFpqWTJRdFlUZzFaVGxtWldZeE16Vms
Cache-Control: no-cache
Postman-Token: a5ece429-6d43-838f-bf81-b39fdd016dd8
Content-Type: application/x-www-form-urlencoded
grant_type=authorization_code&client_id=77458a6996ba4ae94ea028644d070763&redirect_uri=http%3A%2F%2Fhttpbin.org%2Fpost&code=KOKf4uDdQ5uMF__rPRNZXw
=== RESPONSE ===
{“error”:“invalid_request”,“error_description”:“The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed.”}
Do you have any advice on how I can get the token to authorize?
Best regards,
Alex