0
votes

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"

we wanted to execute the above cURL command in PostMan. But we don't where to put the clientapp:123456.

Thanks in advance

2

2 Answers

2
votes

Although it's bit late, I would like to answer the question which is as below : You need to set the -vu values as username and password trough basic auth. enter image description here

1
votes

Short options can usually be combined, so -vu is the same as -v -u.

man curl says:

-v, --verbose
              Be  more  verbose/talkative during the operation. Useful for debugging and seeing what's going on "under the hood". A line starting with '>'
              means "header data" sent by curl, '<' means "header data" received by curl that is hidden in normal cases, and  a  line  starting  with  '*'
              means additional info provided by curl.
-u, --user <user:password>
              Specify the user name and password to use for server authentication. Overrides -n, --netrc and --netrc-optional.