Package org.mockserver.saml
Class SamlAssertionStore
java.lang.Object
org.mockserver.saml.SamlAssertionStore
In-memory state backing the mock SAML SSO flow.
Holds one SamlAssertionStore.Provider per generated mock IdP, keyed by the ssoServiceUrl it
serves. The /saml/sso class callback (SamlSsoCallback) looks up its provider by
the request path to build, sign, and POST a SAML Response back to the SP's assertion
consumer service.
This is a process-wide singleton (mirroring OidcAuthorizationStore
and the other in-memory registries) because the SSO class callback is instantiated fresh per
request and therefore cannot share instance state.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classImmutable description of a generated mock SAML IdP, holding everything the SSO callback needs to mint and sign a freshResponseper request. -
Method Summary
Modifier and TypeMethodDescriptionstatic SamlAssertionStoreproviderForSloPath(String sloServiceUrl) Finds the provider serving the given Single-Logout (SLO) path, ornullif none registered (or the provider has no SLO endpoint configured).providerForSsoPath(String ssoServiceUrl) Finds the provider serving the given SSO path, ornullif none registered.voidregisterProvider(SamlAssertionStore.Provider provider) Registers (or replaces) the provider serving the given SSO path.voidreset()
-
Method Details
-
getInstance
-
registerProvider
Registers (or replaces) the provider serving the given SSO path. The most recently registered provider for a path wins, so re-runningPUT /mockserver/samlwith the same SSO path refreshes the signing credential and attributes. -
providerForSsoPath
Finds the provider serving the given SSO path, ornullif none registered. -
providerForSloPath
Finds the provider serving the given Single-Logout (SLO) path, ornullif none registered (or the provider has no SLO endpoint configured). -
reset
public void reset()
-