Projects · 2026
Lantern Auth
Staff sign-in for an invented retail chain on Keycloak, including a shared till where cashiers identify themselves with a PIN.
- .NET 10
- Blazor
- Keycloak 26
- Java 21
- Docker Compose
- Playwright
- automated tests against a real Keycloak
- 283
- decision records
- 9
- Blazor apps on one identity provider
- 3
- bugs only the browser tests caught
- 4
- 259 integration
- 16 browser
- 8 unit (JUnit)
What it does
Lantern Mart is an invented retail chain with three kinds of staff sign-in. HQ staff use the Back Office. Outlet managers use Outlet Admin, which only shows their own outlet. Each till has its own account, signs in once and stays signed in; cashiers then enter a PIN that records who rang up the sale without signing the till out.
All three apps are Blazor and keep tokens on the server, so the browser only ever holds a cookie. Keycloak does the signing in, with a small Java plugin for what it cannot do out of the box: mapping a person to their outlet, allowing one account per till, and turning people away from an app without counting it as a failed login. The API checks every request against named policies and asks Keycloak whether a token is still active, so someone who is deactivated loses access straight away rather than when their token expires.
What I learned
- Test against the real dependency. The integration tests run against Keycloak in Testcontainers. When I added browser tests, they still found four bugs that HTTP could not show. I wrote them up in a note.
- Defaults carry opinions. Keycloak’s built-in deny step counts as a failed login. That was harmless until people could be refused by role, and then it locked them out of the apps they were allowed into.
- Write decisions down when they are made. Nine short records explain why the system looks the way it does.




