· 7 years ago · Oct 23, 2017, 05:40 AM
1root@y2k-CIH:/home/y2k# curl -X POST -vu clientaid:secret http://localhost:8080/oauth/token -H "Accept: application/json" -d "client_id=clientid&grant_type=password&username=admin&password=admin"ecret http://localhost:8080/oauth/token -H "Accept: application/json" -d "client_id=clienti* Trying 127.0.0.1...
2* Connected to localhost (127.0.0.1) port 8080 (#0)
3* Server auth using Basic with user 'clientaid'
4> POST /oauth/token HTTP/1.1
5> Host: localhost:8080
6> Authorization: Basic Y2xpZW50YWlkOnNlY3JldA==
7> User-Agent: curl/7.43.0
8> Accept: application/json
9> Content-Length: 68
10> Content-Type: application/x-www-form-urlencoded
11>
12* upload completely sent off: 68 out of 68 bytes
13< HTTP/1.1 401
14< X-Content-Type-Options: nosniff
15< X-XSS-Protection: 1; mode=block
16< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
17< Pragma: no-cache
18< Expires: 0
19< X-Frame-Options: DENY
20* Authentication problem. Ignoring this.
21< WWW-Authenticate: Basic realm="oauth2/client"
22< Content-Type: application/json;charset=UTF-8
23< Transfer-Encoding: chunked
24< Date: Mon, 23 Oct 2017 05:34:43 GMT
25<
26{
27 "timestamp" : "2017-10-23T05:34:43.865+0000",
28 "status" : 401,
29 "error" : "Unauthorized",
30 "message" : "Bad credentials",
31 "path" : "/oauth/token"
32* Connection #0 to host localhost left intact
33}root@y2k-CIH:/home/y2k#