spring-boot/spring-boot-samples/spring-boot-sample-oauth2-client
Madhura Bhave f5deebf0cb Support authorization_code grant for OAuth2 client
This commit also refactors OAuth2 client properties. With
the added support for authorization_code clients, client
registrations are now divided into `login` and `authorization_code`.
An environment post processor is used for backward compatibility with
old Open ID Connect login clients.

Closes gh-13812
2018-08-28 13:49:07 -07:00
..
src Support authorization_code grant for OAuth2 client 2018-08-28 13:49:07 -07:00
pom.xml Add starter for OpenID Connect/OAuth2 client 2018-08-17 13:03:55 -07:00
README.adoc

= Spring Boot Sample OAuth2 Client

== Register Github OAuth2 application
To run the sample, you need to link:https://github.com/settings/applications/new[register an OAuth application on Github].
While registering your application, ensure the Authorization callback URL is set to http://localhost:8080/login/oauth2/code/github.
After completing the registration, you will have a new OAuth Application with a Client ID and Client Secret.

== Configuring application.yml
Once the OAuth application is registered with GitHub, you need to configure the sample application to use this OAuth application (client).
Edit the link:src/main/resources/application.yml[application.yml] and replace ${APP-CLIENT-ID} and ${APP-CLIENT-SECRET} with the OAuth client credentials created in the previous section.

The sample can now be run and you can login with your Github user credentials.