O'Reilly logo

Spring Security - Third Edition by Peter Mularien, Robert Winch, Mick Knutson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Token requests

When we make the initial token request, we should get a successful response similar to the following:

    $ http -a oauthClient1:oauthClient1Password -f POST    localhost:8080/oauth/token         grant_type=password username=user1@example.com password=user1     HTTP/1.1 200    Cache-Control: no-cache, no-store, max-age=0, must-revalidate    Cache-Control: no-store    Content-Type: application/json;charset=UTF-8    Date: Thu, 09 Nov 2017 20:29:26 GMT    Expires: 0    Pragma: no-cache    Pragma: no-cache    Transfer-Encoding: chunked    X-Application-Context: application:default    X-Content-Type-Options: nosniff    X-Frame-Options: DENY    X-XSS-Protection: 1; mode=block     {    "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MT AzMDI1NjYsInVzZXJfbmFtZSI6InVzZXIxQGV4YW1wbGUuY29tIiwiYXV0aG9yaXRpZ ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required