Interface AuthnRequestStore
- All Known Implementing Classes:
InMemoryAuthnRequestStore
public interface AuthnRequestStore
SPI for the registry of outstanding SAML authentication request IDs.
SamlAssertionValidator.rememberAuthnRequest(String) records the ID of each request this SP sends, and a
response whose confirmation carries a matching InResponseTo consumes it. Each ID is accepted once.
Multi-node deployments should supply an implementation backed by a store shared across every node, since the
response may arrive at a different node than the one that sent the request.
Implementations must be thread-safe.
- Since:
- 10.0.0
- See Also:
-
Method Summary
-
Method Details
-
remember
Records an outstanding request ID.- Parameters:
id- TheIDattribute of the outgoing request. Nevernull or blank.expiresAtMs- The epoch-millisecond instant after which the ID is no longer accepted.nowMs- The current epoch-millisecond instant according to the validator's clock.- Throws:
IllegalStateException- If the store cannot accept more outstanding requests.
-
consume
Atomically removes a request ID and reports whether it was outstanding.- Parameters:
id- TheInResponseTovalue from the response. Nevernull or blank.nowMs- The current epoch-millisecond instant according to the validator's clock.- Returns:
true if the ID was registered, unexpired and not yet consumed.
-