https://github.com/chr-fritz/oidc-java-fatclient-demo
Demo repository to show how to implement an OIDC Login into a java client application.
https://github.com/chr-fritz/oidc-java-fatclient-demo
java oidc oidc-client pkce-authentication pkce-flow pkce-oauth
Last synced: about 1 year ago
JSON representation
Demo repository to show how to implement an OIDC Login into a java client application.
- Host: GitHub
- URL: https://github.com/chr-fritz/oidc-java-fatclient-demo
- Owner: chr-fritz
- License: mit
- Created: 2022-10-23T15:50:09.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-09T16:38:07.000Z (over 3 years ago)
- Last Synced: 2025-02-17T00:50:00.270Z (over 1 year ago)
- Topics: java, oidc, oidc-client, pkce-authentication, pkce-flow, pkce-oauth
- Language: Java
- Homepage:
- Size: 440 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OIDC Java Fat-Client Demo
This repository contains a small demo about how to authenticate a java client application
with [OpenID Connect](https://openid.net/connect/) and
the [OAuth2 Authorization Code Flow with PKCE](https://www.rfc-editor.org/rfc/rfc7636).
It was part of my Talk at the JUG Nürnberg. The slides are available on SlideShare:
## Run the demo
### Keycloak Setup
1. Start keycloak locally using docker or podman as described in the Keycloak
documentation:
2. Login into the admin console
3. Create a new OIDC Client named `java-demo`:

and

4. Add the redirect uri `http://localhost:*`:

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

Then a browser window should be opened:

After a successful login, you should see that the demo got a valid access token and got the
information from the user info endpoint:

## Maintainer
Christian Fritz (@chrfritz),
## License
This software is provided under the MIT open source license, read the [`LICENSE`](LICENSE)
file for details.