Interface CredentialSupplier
- All Known Subinterfaces:
KubernetesJwtSupplier
- All Known Implementing Classes:
KubernetesServiceAccountTokenFile
,ResourceCredentialSupplier
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Interface to obtain an arbitrary credential that is uses in
ClientAuthentication
or AuthenticationSteps
methods. Typically,
implementations obtain their credential from a file.- Since:
- 2.2
- Author:
- Mark Paluch
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault CredentialSupplier
cached()
Retrieve a cachedCredentialSupplier
that obtains the credential early and reuses the token for eachget()
call.get()
Get a credential to be used with an authentication mechanism.
-
Method Details
-
get
String get()Get a credential to be used with an authentication mechanism. -
cached
Retrieve a cachedCredentialSupplier
that obtains the credential early and reuses the token for eachget()
call.Reusing a cached token can lead to authentication failures if the credential expires.
- Returns:
- a caching
CredentialSupplier
.
-