Package com.oracle.bmc.auth
Interface ProvidesConfigurableRefreshAsync
-
- All Known Implementing Classes:
AbstractAsyncFederationClient,WorkloadIdentityFederationClient
public interface ProvidesConfigurableRefreshAsyncAn interface that has the API to return refresh security token after if the token expires within a configurable time asynchronously.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CompletableFuture<String>refreshAndGetSecurityTokenIfExpiringWithin(Duration time)Gets a security token from the federation endpoint if the security token expires within the provided duration.CompletableFuture<String>refreshAndGetSecurityTokenIfExpiringWithin(Duration time, boolean refreshKeys)Gets a security token from the federation endpoint if the security token expires within the provided duration and allows to enable/disable refresh of keys.
-
-
-
Method Detail
-
refreshAndGetSecurityTokenIfExpiringWithin
CompletableFuture<String> refreshAndGetSecurityTokenIfExpiringWithin(Duration time)
Gets a security token from the federation endpoint if the security token expires within the provided duration.This will always retrieve a new token from the federation endpoint and does not use a cached token.
- Parameters:
time- the duration to check- Returns:
- A CompletableFuture that completes with a security token that can be used to authenticate requests.
-
refreshAndGetSecurityTokenIfExpiringWithin
CompletableFuture<String> refreshAndGetSecurityTokenIfExpiringWithin(Duration time, boolean refreshKeys)
Gets a security token from the federation endpoint if the security token expires within the provided duration and allows to enable/disable refresh of keys.This will always retrieve a new token from the federation endpoint and does not use a cached token.
- Parameters:
time- the duration to checkrefreshKeys- boolean value to enable/disable refresh of keys- Returns:
- A CompletableFuture that completes with a security token that can be used to authenticate requests.
-
-