I'm trying to figure out how to use 2-legged workflows in this example. (I read test_oauth2/test_client_credential.py for reference). But it always returns "invalid client", even though the exact same ID and secret works fine for 3-legged workflow as explained in the documentation here. I have tried using both curl and postman to get access tokens using client credentials.
What I have tried so far:
Start provider and create a user.
Get client ID and secret from 127.0.0.1:5000/client
curl -X POST -d "client_id=BMaVPo73PCTzzaUo3TuIu6gXdOY8gu5ogOEy9cLW&client_secret=vxHxrzmUYlEPJXaptZ8IlVqezfLwGWxV6mLXO3jShKEqoWfunU&grant_type=client_credentials" http://127.0.0.1:5000/oauth/token
I'm trying to figure out how to use 2-legged workflows in this example. (I read test_oauth2/test_client_credential.py for reference). But it always returns "invalid client", even though the exact same ID and secret works fine for 3-legged workflow as explained in the documentation here. I have tried using both curl and postman to get access tokens using client credentials. What I have tried so far:
curl -X POST -d "client_id=BMaVPo73PCTzzaUo3TuIu6gXdOY8gu5ogOEy9cLW&client_secret=vxHxrzmUYlEPJXaptZ8IlVqezfLwGWxV6mLXO3jShKEqoWfunU&grant_type=client_credentials" http://127.0.0.1:5000/oauth/token
Or using the OAuth 2.0 mechanism in Postman 5.5.3