Application and server configuration for using OAuth authentication.
- Java 17 or later is required
- Build liberty locally with the changes you want to test
- Clone this repository
- In
gradle.properties
updatetest.liberty.installDir
to point to thebuild.image/wlp
directory in your workspace so that the test runs on your locally built liberty - start the servers and deploy the test application by running
./gradlew libertyStart
- Go to https://localhost:9444/openapi/ui/
- Click
Authorize
and go tooauth
section - Provide
Client_id
mcp
- Provide
Client_secret
abc
- Select
test
scope - Click
authorize
- Login with user credentials
testuser
/testpassword
- click
allow once
- you should be returned to the OpenAPI UI
- Login with user credentials
- You should now be able to successfully call the
/private
APIs - The
/sec
APIs should show you logged in astestuser
with therestricted
role
- Stop both servers with
./gradlew libertyStop