Class BlockListStore
java.lang.Object
org.gridgain.internal.security.jwt.store.BlockListStore
Store for revoked tokens and timestamps.
-
Constructor Summary
ConstructorsConstructorDescriptionBlockListStore(org.apache.ignite.internal.metastorage.MetaStorageManager metaStorage, long cleanerInterval, TimeUnit cleanerIntervalUnit, org.apache.ignite.internal.security.jwt.configuration.JwtConfiguration jwtConfiguration) Constructor. -
Method Summary
Modifier and TypeMethodDescription@Nullable InstantgetTimestamp(String username) Returns saved timestamp for a given username.booleanisTokenBlocked(String token) Returns token metadata for a given token.Saves revoked token.saveUsernameAndTimestamp(String username, Instant timestampRecord) Saves timestamp for a given username.voidstart()Starts the store.voidstop()Stops the store.
-
Constructor Details
-
BlockListStore
public BlockListStore(org.apache.ignite.internal.metastorage.MetaStorageManager metaStorage, long cleanerInterval, TimeUnit cleanerIntervalUnit, org.apache.ignite.internal.security.jwt.configuration.JwtConfiguration jwtConfiguration) Constructor.- Parameters:
metaStorage- Meta storage manager.cleanerInterval- Cleaner interval in minutes.
-
-
Method Details
-
start
public void start()Starts the store. -
stop
public void stop()Stops the store. -
saveToken
Saves revoked token.- Parameters:
token- Token.expirationTime- Expiration time.- Returns:
- Future that will be completed when the token is saved.
-
isTokenBlocked
Returns token metadata for a given token.- Parameters:
token- Token.- Returns:
- Token metadata.
nullif token is not blocked.
-
saveUsernameAndTimestamp
Saves timestamp for a given username. Timestamp is used to invalidate all tokens issued before the timestamp.- Parameters:
username- Username.timestampRecord- Timestamp.- Returns:
- Future that will be completed when operation the timestamp is saved.
-
getTimestamp
Returns saved timestamp for a given username.- Parameters:
username- Username.- Returns:
- Timestamp.
nullif timestamp is not set.
-