Class InMemoryAuthnRequestStore

java.lang.Object
org.apache.juneau.rest.server.auth.saml.InMemoryAuthnRequestStore
All Implemented Interfaces:
AuthnRequestStore

public class InMemoryAuthnRequestStore extends Object implements 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 Details

  • Constructor Details

  • Method Details

    • remember

      public void remember(String id, long expiresAtMs, long nowMs)
      Description copied from interface: AuthnRequestStore
      Records an outstanding request ID.
      Specified by:
      remember in interface AuthnRequestStore
      Parameters:
      id - The ID attribute of the outgoing request. Never null 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

      public boolean consume(String id, long nowMs)
      Description copied from interface: AuthnRequestStore
      Atomically removes a request ID and reports whether it was outstanding.
      Specified by:
      consume in interface AuthnRequestStore
      Parameters:
      id - The InResponseTo value from the response. Never null 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.