Imported Google Group message. Original thread at: Redirecting to Google Groups Import Date: 2016-01-19 21:27:58 +0000. Sender:Nolan Johnson. Date:Monday, 19 October 2015 04:03:21 UTC+1.
I see that Tyk now supports the password grant oauth flow (Full OAuth 2 Support · Issue #93 · TykTechnologies/tyk · GitHub) - great! Does Tyk Cloud support this yet? When I try the steps listed in the issue (see below), I get this response: {“error”:“unsupported_grant_type”,“error_description”:“The authorization grant type is not supported by the authorization server.”} - not sure if I’m doing something wrong or if it’s not released to cloud yet.
I’m trying the following curl command:
curl -d “username=[myuser]&password=[mypass]” -H “Authorization: Basic [myclientId]:[mysecret]” http://[myapp].cloud.tyk.io/[myapi]/oauth/token/
Imported Google Group message. Sender:Martin Buhr. Date:Monday, 19 October 2015 09:17:07 UTC+1.
Hi Nolan,
Yes it does, though you might be missing a few elements though…
Set up the API to use OAuth, and select the “password” grant type from the check boxes that appear in the designer, then when you request your token, your request should look like this:
Imported Google Group message. Sender:Nolan Johnson. Date:Tuesday, 20 October 2015 03:43:34 UTC+1.
Thanks, Martin. That got me a lot closer. Now I’m getting the following as a response:
{“error”:“unauthorized_client”,“error_description”:“The client is not authorized to request a token using this method.”}
Makes me think I set something up wrong in the dashboard.
I’ve got the API set up with:
Authentication Mode: Oauth 2.0
Allowed Access Types: password
Allowed Authorize Types: Token
There don’t seem to be relevant configuration options for the Oauth client.
Imported Google Group message. Sender:Martin Buhr. Date:Tuesday, 20 October 2015 06:57:49 UTC+1.
Hi Nolan,
In the API list view, alongside the API that is using OAuth, under the edit button, is a button for the OAuth clients - you will need to create one there.
Hi martin thanks for your suggestion, you mean configuring proxy provider profile, or is Tyk Identity Broker now support writing custom handler. I did not understood properly please explain.
Actually in Tyk Cloud you wont be able to use TIB, sorry - I didn’t see that in the title. There’s no other way to do this with cloud. Perhaps with on-prem you could write some middleware that does it.