Listing 6.12 contains two "return" on line 23. The line "return return UsernamePasswordAuthenticationToken.class" in the listing should become "return UsernamePasswordAuthenticationToken.class"
The @Configuration annotation is missing over the ProjectConfig class. This should look like the one presented in listing 10.3.
In the first snippet, the last last line, http://localhost:8080/user/auth, should be
http:/./localhost:8080/user/auth
Note the addition of /./.
"Here, you obtain a token as we did in section 15.2.3 and use it to call the test endpoint of the resource server:" should be "Here, you obtain a token as we did in section 15.1.2 and use it to call the test endpoint of the resource server"