ansv7779 5144f81fed
/ build (push) Successful in 1m53s
Fix impersonating non-developer with OIDC session
When a developer tried to impersonate a user (principal) that had an active OIDC session, it triggered an edge case. The edge case found the existing session from the non-developer which lead to the JWT generation trying to populate the OIDC claim "auth_time". The authentication time is looked up from the `FactorGrantedAuthority`'s in the custom principals authorities. Since there was no such authority it failed.

When a developer impersonates a user such an authority is now added so that the claim can be populated if necessary.
2026-06-04 22:31:44 +02:00
2025-03-21 15:14:33 +01:00
2025-03-21 15:14:43 +01:00
2025-03-25 12:44:32 +01:00
2025-03-21 15:14:33 +01:00
2026-05-22 20:22:13 +02:00

Using as an embedded Docker Compose service

services:
  oauth2:
    image: gitea.dsv.su.se/dmc/oauth2:latest
    ports:
      - "<host_port>:8080"
    environment:
      CLIENT_ID=awesome-app
      CLIENT_SECRET=p4ssw0rd
      CLIENT_REDIRECT_URI=http://localhost/oauth2/callback

Development

Prerequisites

  • JDK 17 (or later)
  • Docker
  • Docker compose 2.24.0 (or later)

Run mvnw spring-boot:run to start the application.

If running via IntelliJ or some other means make sure the "dev" Spring profile is activated. You may have to run mvnw compile to generate any necessary files.

The application will be available at http://localhost:8080

S
Description
No description provided
Readme 703 KiB
Languages
Java 99%
Dockerfile 0.9%
CSS 0.1%