Try it

You'll be sent to the gateway to scan a QR code with your EUDI wallet. Once you share your PID, Spring Security completes the login and you land on a protected page that greets you by the family name returned from /gateway/introspect.

Sign in with your wallet

What's behind it

Client registration

Authorization URI /gateway/authorize, token URI /gateway/token, client_secret_basic - the same settings you'd give any OAuth2 provider.

Introspection as user info

The gateway isn't an OpenID Connect provider, so a small OAuth2UserService calls /gateway/introspect and turns credential_claims into the user's attributes.

Ordinary controller

The protected page reads family_name with @AuthenticationPrincipal OAuth2User, like any other Spring login.

Want the raw HTTP calls instead? See the hand-written OAuth demo.