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

What is User credentails to get access token #53

Open
muthukumar9 opened this issue Mar 23, 2017 · 2 comments
Open

What is User credentails to get access token #53

muthukumar9 opened this issue Mar 23, 2017 · 2 comments

Comments

@muthukumar9
Copy link

Hi,

I have checked out the code and tried executing in my local, however I am getting response as Bad Credentials. I am unsure what is the username and password to get the access token ?

Below is the request/response payloads, let me know if I am wrong anywhere.
curl -X POST -vu clientapp:123456 http://localhost:8080/oauth/token -H "Accept: application/json" -d "password=spring&username=roy&grant_type=password&scope=read%20write&client_secret=123456&client_id=clientapp"

{"error":"invalid_grant","error_description":"Bad credentials"}

Can you please guide what could be wrong in the above request.

~MS

@pacmandv
Copy link

pacmandv commented May 9, 2017

Hi @muthukumar9 ,

as i see you have an incorrect parameter

curl -X POST -vu clientapp:123456 http://localhost:8080/oauth/token -H "Accept: application/json" -d "password=spring&username=roy&grant_type=password&scope=read%20write&client_secret=123456&client_id=clientapp"

read%20write should be read_write

@svlada
Copy link

svlada commented Aug 23, 2017

@pacmandv @royclarkson

It's a bit strange for front-end application to pass in client_secret=123456&client_id=clientapp paramaters.

What do you suggest to do in case where we have SPA (react, angular) interacting with this setup?

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