Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure to register client_credentials token #5358

Closed
ghurson opened this issue Oct 10, 2018 · 2 comments
Closed

Failure to register client_credentials token #5358

ghurson opened this issue Oct 10, 2018 · 2 comments

Comments

@ghurson
Copy link

ghurson commented Oct 10, 2018

Steps to reproduce

  1. Register oAuth client with client_credentials as the Grant type
  2. Take client ID and Secret key to create postman oauth2 request with no scope, client id and secret in place, and a token url of

http://localhost:5000/api/token

  1. Request Token

Expected behaviour

Access and refresh keys should be provided

Actual behaviour

Error message 'unsupported_grant_type'

Browser/system information

MacOS running H in a local instance in docker.

Additional details

Requests info

Request Headers:
content-type:"application/x-www-form-urlencoded"
user-agent:"PostmanRuntime/7.3.0"
accept:"/"
host:"localhost:5000"
accept-encoding:"gzip, deflate"
content-length:141
Request Body:
grant_type:"client_credentials"
scope:""
client_id:"[removed]"
client_secret:"[removed]"
Response Headers:
server:"gunicorn/19.9.0"
date:"Wed, 10 Oct 2018 14:26:48 GMT"
connection:"close"
content-type:"text/html; charset=UTF-8"
content-length:"35"
referrer-policy:"origin-when-cross-origin, strict-origin-when-cross-origin"
x-xss-protection:"1; mode=block"
Response Body:
error:"unsupported_grant_type"

Request Headers:
content-type:"application/x-www-form-urlencoded"
user-agent:"PostmanRuntime/7.3.0"
accept:"/"
host:"localhost:5000"
accept-encoding:"gzip, deflate"
content-length:141
Request Body:
grant_type:"client_credentials"
scope:""
client_id:"[removed]"
client_secret:"[removed]"
Response Headers:
server:"gunicorn/19.9.0"
date:"Wed, 10 Oct 2018 14:40:00 GMT"
connection:"close"
content-type:"text/html; charset=UTF-8"
content-length:"35"
referrer-policy:"origin-when-cross-origin, strict-origin-when-cross-origin"
x-xss-protection:"1; mode=block"
Response Body:
error:"unsupported_grant_type"

@robertknight
Copy link
Member

You can't use client_credentials credentials to get access and refresh tokens. These credentials are instead for using privileged APIs such as creating user accounts.

Can you explain what it is that you are trying to do?

@leedenison
Copy link

Closing due to inactivity. Please reopen with additional context if this continues to be an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants