From ab8aa6bb6c05417f017407e5544c49aa167da8df Mon Sep 17 00:00:00 2001 From: Madhura Bhave Date: Thu, 5 Oct 2017 18:23:10 -0700 Subject: [PATCH] Add README for OAuth2 client sample --- .../spring-boot-sample-oauth2-client/README.adoc | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 spring-boot-samples/spring-boot-sample-oauth2-client/README.adoc diff --git a/spring-boot-samples/spring-boot-sample-oauth2-client/README.adoc b/spring-boot-samples/spring-boot-sample-oauth2-client/README.adoc new file mode 100644 index 00000000000..5a041156f95 --- /dev/null +++ b/spring-boot-samples/spring-boot-sample-oauth2-client/README.adoc @@ -0,0 +1,12 @@ += 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/oauth2/authorize/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.