@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. This is useful to prevent I/O
operations in e.g. reactive usage.
Reusing a cached token can lead to authentication failures if the credential expires.
CredentialSupplier
.Copyright © 2016–2019 Pivotal Software, Inc.. All rights reserved.