Interface ClientAssertionReplayRegistry
- All Known Implementing Classes:
JdbcClientAssertionReplayRegistry
public interface ClientAssertionReplayRegistry
Port that remembers the identifiers (
jti) of the client assertions already accepted, so an assertion cannot
be presented twice. Implementations never return null.-
Method Summary
-
Method Details
-
register
Records the first use of an assertion identifier of a client. Safe under concurrency: of several simultaneous registrations of the same pair exactly one returnstrue.- Parameters:
clientId- identifier of the client.jti- thejticlaim of the assertion.expiresAt- instant at which the assertion expires.- Returns:
trueonly when the pair had not been registered before,falsefor a replay.
-
purgeExpired
Forgets the identifiers of the assertions that expired at or before an instant.- Parameters:
now- the current instant.- Returns:
- the number of identifiers removed.
-