Class InMemoryTokenCredentialStore
java.lang.Object
com.svenruppert.jsentinel.credential.propagation.InMemoryTokenCredentialStore
- All Implemented Interfaces:
TokenCredentialStore
@ExperimentalJSentinelApi
public final class InMemoryTokenCredentialStore
extends Object
implements TokenCredentialStore
Single-slot in-memory store. Not thread-safe — intended for unit
tests and reference tooling. Production code uses the adapter
defaults (
VaadinSessionTokenCredentialStore,
ThreadLocalTokenCredentialStore).- Since:
- 00.74.00
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbind(TokenCredential credential) Replace any current entry withcredential.voidclear()Reset to the empty state.current()
-
Constructor Details
-
InMemoryTokenCredentialStore
public InMemoryTokenCredentialStore()
-
-
Method Details
-
bind
Description copied from interface:TokenCredentialStoreReplace any current entry withcredential.- Specified by:
bindin interfaceTokenCredentialStore- Parameters:
credential- the new entry (non-null)
-
current
- Specified by:
currentin interfaceTokenCredentialStore- Returns:
- the current entry, or empty
-
clear
public void clear()Description copied from interface:TokenCredentialStoreReset to the empty state. Idempotent — repeated calls are no-ops.- Specified by:
clearin interfaceTokenCredentialStore
-