I recently wrote an article on Medium showing the complete step-by-step configuration and providing the Git repository used in the example.
If you’d like to take a look.
https://medium.com/@lucas.rj.fernandes/spring-security-with-oauth2-and-linkedin-a20874ae7477