Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 993 Bytes

File metadata and controls

36 lines (24 loc) · 993 Bytes

chapter17.02-calendar

Execute the below command using Gradle from the project directory:

./gradlew bootRun

Alternatively, if you're using Maven, execute the following command from the project directory:

./mvnw spring-boot:run

To test the application, open a web browser and navigate to: http://localhost:8080 img.png

At this point, we can start the chapter17.00-authorization-server and chapter17.02-calendar and we will be ready to send OAuth 2 requests.

curl -i -X POST \
http://localhost:9000/oauth2/token \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'grant_type=client_credentials&client_id=jbcp-calendar&&client_secret=secret&scope=events.read'

Now we will take the access_token and use that token to initiate additional requests to the server with the following format:

curl -k -i http://localhost:8080/events/  \
-H "Authorization: Bearer <access_token>"