Skip to content

Azquelt/liberty-oauth-example

Repository files navigation

Liberty OAuth client-server demo

Application and server configuration for using OAuth authentication.

Setup

  • Java 17 or later is required
  • Build liberty locally with the changes you want to test
  • Clone this repository
  • In gradle.properties update test.liberty.installDir to point to the build.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

Usage

  • Go to https://localhost:9444/openapi/ui/
  • Click Authorize and go to oauth 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
  • You should now be able to successfully call the /private APIs
  • The /sec APIs should show you logged in as testuser with the restricted role

Shutdown

  • Stop both servers with ./gradlew libertyStop

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages