@FunctionalInterface
public interface CredentialRetriever
Modifier and Type | Method and Description |
---|---|
java.util.Optional<Credential> |
retrieve()
Fetches the credentials.
|
java.util.Optional<Credential> retrieve() throws CredentialRetrievalException
Implementations should return Optional.empty()
if no credentials could be fetched with
this CredentialRetriever
(and so other credential retrieval methods may be tried), or
throw an exception something went wrong when fetching the credentials.
Optional.empty()
if no credentials could be fetched
with this providerCredentialRetrievalException
- if the credential retrieval encountered an exception