Package io.pravega.client.security.auth
Class StringTokenProviderImpl
- java.lang.Object
-
- io.pravega.client.security.auth.StringTokenProviderImpl
-
- All Implemented Interfaces:
DelegationTokenProvider
public class StringTokenProviderImpl extends java.lang.Object implements DelegationTokenProvider
A provider for handling non-JWT, non-empty delegation tokens. Used solely for testing purposes.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
populateToken(java.lang.String token)
Populates the object with the specified delegation token.java.util.concurrent.CompletableFuture<java.lang.String>
retrieveToken()
Retrieve delegation token.void
signalTokenExpired()
Signals the object that the token it may be holding has expired.
-
-
-
Method Detail
-
retrieveToken
public java.util.concurrent.CompletableFuture<java.lang.String> retrieveToken()
Description copied from interface:DelegationTokenProvider
Retrieve delegation token.- Specified by:
retrieveToken
in interfaceDelegationTokenProvider
- Returns:
- a CompletableFuture that, when completed, will return the retrieved delegation token
-
populateToken
public boolean populateToken(java.lang.String token)
Description copied from interface:DelegationTokenProvider
Populates the object with the specified delegation token.- Specified by:
populateToken
in interfaceDelegationTokenProvider
- Parameters:
token
- the token to populate the object with- Returns:
- whether the population was successful
-
signalTokenExpired
public void signalTokenExpired()
Description copied from interface:DelegationTokenProvider
Signals the object that the token it may be holding has expired.- Specified by:
signalTokenExpired
in interfaceDelegationTokenProvider
-
-