Class InMemoryAuthnRequestStore
java.lang.Object
org.apache.juneau.rest.server.auth.saml.InMemoryAuthnRequestStore
- All Implemented Interfaces:
AuthnRequestStore
Per-process, in-memory implementation of
AuthnRequestStore.
Holds at most DEFAULT_MAX_ENTRIES unexpired request IDs; each ID is accepted once. Not shared
between nodes.
- Since:
- 10.0.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault upper bound on outstanding request IDs. -
Constructor Summary
ConstructorsConstructorDescriptionConstructor usingDEFAULT_MAX_ENTRIES.InMemoryAuthnRequestStore(int maxEntries) Constructor. -
Method Summary
-
Field Details
-
DEFAULT_MAX_ENTRIES
Default upper bound on outstanding request IDs.- See Also:
-
-
Constructor Details
-
InMemoryAuthnRequestStore
public InMemoryAuthnRequestStore()Constructor usingDEFAULT_MAX_ENTRIES. -
InMemoryAuthnRequestStore
Constructor.- Parameters:
maxEntries- The maximum number of outstanding request IDs. Must be positive.
-
-
Method Details
-
remember
Description copied from interface:AuthnRequestStoreRecords an outstanding request ID.- Specified by:
rememberin interfaceAuthnRequestStore- 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.
-
consume
Description copied from interface:AuthnRequestStoreAtomically removes a request ID and reports whether it was outstanding.- Specified by:
consumein interfaceAuthnRequestStore- 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.
-