Understanding the sample application
The sample application consists of two parts – a frontend web application and a backend REST API.
The frontend web application is a single-page application written in JavaScript. As we want to focus on what Keycloak can offer, the application is very simple. Furthermore, to make it as simple as possible to run the application, it uses Node.js. The application provides the following features:
- Login with Keycloak.
- It displays the user's name.
- It displays the user's profile picture, if available.
- It shows the ID token.
- It shows the Access token.
- It refreshes the tokens.
- It invokes the secured endpoint provided by the backend.
The backend REST API is also very simple, and is implemented with Node.js. It provides a REST API with two endpoints:
/public
: A publicly available endpoint with no security/secured
: A secured endpoint requiring an access token with themyrealm
global role...