Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 25 days 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 (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-09T16:38:07.000Z (about 2 years ago)
- Last Synced: 2024-11-06T13:57:24.369Z (2 months 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`:
![create client](docs/images/create-client-step1.png)
and
![create client step 2](docs/images/create-client-step2.png)
4. Add the redirect uri `http://localhost:*`:
![Add redirect uri](docs/images/set-redirect-url.png)### 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](docs/images/intellij-runconfig.png)Then a browser window should be opened:
![Login-Screen](docs/images/login-screen.png)
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](docs/images/logs.png)## Maintainer
Christian Fritz (@chrfritz),
## License
This software is provided under the MIT open source license, read the [`LICENSE`](LICENSE)
file for details.