xetys / spring-cloud-oauth2-example

An example of spring oauth2 authorization and resource server using JWT
157 stars 92 forks source link

getting 401 instead od access token #3

Open qwertukg opened 6 years ago

qwertukg commented 6 years ago

Hi! Good example! But when i try to get access token by cUrl:

-XPOST "web_app:@localhost:9999/oauth/token" -d "grant_type=password&username=reader&password=reader"

getting:

{
    "error": "unauthorized",
    "error_description": "Full authentication is required to access this resource"
}

Just clone repo

xetys commented 5 years ago

I would try this using the -u option of curl, like

curl -u 'web_app:' ocalhost:9999/oauth/token  -d "grant_type=password&username=reader&password=reader"