Package com.oracle.bmc.auth
Interface RefreshableOnNotAuthenticatedProvider<T>
-
- Type Parameters:
T
- The type of authentication data held by the provider (e.g. for security tokens this could be a string)
- All Known Implementing Classes:
InstancePrincipalsAuthenticationDetailsProvider
,KeyPairAuthenticationDetailProvider
,ResourcePrincipalAuthenticationDetailsProvider
,ResourcePrincipalsV3AuthenticationDetailsProvider
,SessionTokenAuthenticationDetailsProvider
public interface RefreshableOnNotAuthenticatedProvider<T>
For authentication providers with refreshable authentication data (e.g.those which wrap a security token received from a remote service), this interface flags that when a caller receives a NotAuthenticated error (HTTP 401) that they can refresh the authentication data and retry their request.
Consistent HTTP 401s would indicate that there is potentially an issue outside the issued token, so only making a single retry is suggested.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
refresh()
Refreshes the authentication data used by the provider
-
-
-
Method Detail
-
refresh
T refresh()
Refreshes the authentication data used by the provider- Returns:
- the refreshed authentication data
-
-