Package io.fluxzero.idp.testsupport.localstub


package io.fluxzero.idp.testsupport.localstub
Local Fluxzero IDP stub for application tests.

This module is intentionally shaped like a tenant in the real Fluxzero IDP instead of a generic mock authentication shortcut. Applications should be able to run the same BFF authorization-code-with-PKCE flow locally and in production. The local version is selected by the test classpath and is exposed through normal Fluxzero web handlers, usually on the same proxy origin as the application under test.

The stub creates an in-memory RSA signing key for each JVM run, exposes discovery and JWKS endpoints, serves a minimal username-only login form, issues ID/access tokens, and validates its own tokens for tests. It behaves like a public zero-registration test IDP: applications can choose their own client_id and web callback URL without pre-configuring an OAuth client. The web handlers are mounted at root by default, or under fluxzero.auth.stub.base-path when that property is set. A shared dashboard-hosted test facility can use a visibly test-only issuer path such as /test-idp. It is not meant to model the global Fluxzero IDP tenant and must not be used as production authentication infrastructure.

Use FluxzeroIdpStubApp when the stub should run as its own local Fluxzero application. That standalone app connects to an existing runtime and relies on the existing Fluxzero proxy for HTTP; it does not open an extra HTTP port.