Skip to content

Demo repository to show how to implement an OIDC Login into a java client application.

License

Notifications You must be signed in to change notification settings

chr-fritz/oidc-java-fatclient-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OIDC Java Fat-Client Demo

This repository contains a small demo about how to authenticate a java client application with OpenID Connect and the OAuth2 Authorization Code Flow with PKCE.

It was part of my Talk at the JUG Nürnberg. The slides are available on SlideShare:

https://www.slideshare.net/QAware/anwendungsbergreifende-authentifizierung-integrationspattern-fr-openid-connect

Run the demo

Keycloak Setup

  1. Start keycloak locally using docker or podman as described in the Keycloak documentation: https://www.keycloak.org/getting-started/getting-started-docker#_start_keycloak
  2. Login into the admin console
  3. Create a new OIDC Client named java-demo: create client and create client step 2
  4. Add the redirect uri http://localhost:*:
    Add redirect uri

Run Demo

Run the class de.chrfritz.oidc.auth.CliTestClient in src/test/java. The example shows the Run-Configuration for IntelliJ: IntelliJ Run Config

Then a browser window should be opened: Login-Screen After a successful login, you should see that the demo got a valid access token and got the information from the user info endpoint: Logs

Maintainer

Christian Fritz (@chrfritz), christian.fritz@qaware.de

License

This software is provided under the MIT open source license, read the LICENSE file for details.

About

Demo repository to show how to implement an OIDC Login into a java client application.

Topics

Resources

License

Stars

Watchers

Forks

Languages