Package org.apache.juneau.rest.server.auth.oidc.rp
package org.apache.juneau.rest.server.auth.oidc.rp
OpenID Connect Relying Party (RP) login support for Juneau REST servers.
This opt-in module turns a Juneau REST server into a complete OpenID Connect Relying Party —
the "Log in with Google / Okta / Entra ID / Keycloak" end-to-end glue — sitting on top of
juneau-rest-server-auth-oauth. It orchestrates the browser redirect → callback → session
dance, owning the state / nonce / PKCE bookkeeping, strict ID-token validation, the
session SPI, and the request-time session→identity binding.
The com.nimbusds:oauth2-oidc-sdk dependency is provided-scoped and contained at the
module boundary — it never leaks transitively.
See Also:
-
ClassDescriptionWraps Nimbus's
IDTokenValidatorto validate an OpenID Connect ID token's signature and claims and project the verified claims onto a JuneauClaimsPrincipal.Builder.The shipped, single-node defaultLoginStateStore: a single-use, TTL-bounded, size-bounded in-memory store for the per-loginstate→LoginStateStore.PendingLoginassociation created duringOidcRelyingParty.startLogin(jakarta.servlet.http.HttpServletRequest, jakarta.servlet.http.HttpServletResponse)and consumed duringOidcRelyingParty.completeLogin(jakarta.servlet.http.HttpServletRequest, jakarta.servlet.http.HttpServletResponse).In-memorySessionStorebacked by a bounded-LRU map, indexed bysubandsidso it can satisfy back-channel logout.SPI for the single-use, TTL-boundedstate→ (nonce, PKCEcode_verifier, redirect target) association created duringOidcRelyingParty.startLogin(jakarta.servlet.http.HttpServletRequest, jakarta.servlet.http.HttpServletResponse)and consumed duringOidcRelyingParty.completeLogin(jakarta.servlet.http.HttpServletRequest, jakarta.servlet.http.HttpServletResponse).A pending-login association awaiting the IdP callback.Facade orchestrating an OpenID Connect Authorization-Code-with-PKCE Relying Party login flow on top of thejuneau-rest-server-auth-oauthbuilding blocks.Builder.Immutable record describing a logged-in OpenID Connect Relying Party session.AuthFilterthat resolves the OIDC Relying Party session cookie into aClaimsPrincipalon each request, soRoleBasedRestGuardand@Auth Principalinjection see the filter-resolved identity (viaAuthenticatedRequestWrapper) with zero downstream changes.SPI for persistingOidcSessioninstances and resolving them back from a session-cookie value.StatelessSessionStorethat serializes the session into an HMAC-signed compact JWT carried entirely in the session cookie.Builder.