@FunctionalInterface public interface CredentialSupplier extends Supplier<String>
ClientAuthentication
or AuthenticationSteps
methods. Typically,
implementations obtain their credential from a file.ResourceCredentialSupplier
Modifier and Type | Method and Description |
---|---|
default CredentialSupplier |
cached()
Retrieve a cached
CredentialSupplier that obtains the credential early and
reuses the token for each get() call. |
String |
get()
Get a credential to be used with an authentication mechanism.
|
String get()
default CredentialSupplier cached()
CredentialSupplier
that obtains the credential early and
reuses the token for each get()
call.
Reusing a cached token can lead to authentication failures if the credential expires.
CredentialSupplier
.Copyright © 2016–2024 Pivotal Software, Inc.. All rights reserved.