Class ResourceCredentialSupplier
java.lang.Object
org.springframework.vault.authentication.ResourceCredentialSupplier
- All Implemented Interfaces:
Supplier<String>,CredentialSupplier
- Direct Known Subclasses:
KubernetesServiceAccountTokenFile
Mechanism to retrieve a credential from a
Resource.- Since:
- 2.2
- Author:
- Mark Paluch
- See Also:
-
Constructor Details
-
ResourceCredentialSupplier
- Parameters:
path- path to the file holding the credential.- Throws:
IllegalArgumentException- if thepathdoes not exist.
-
ResourceCredentialSupplier
- Parameters:
file- path to the file holding the credential.- Throws:
IllegalArgumentException- if thepathdoes not exist.
-
ResourceCredentialSupplier
- Parameters:
resource- resource pointing to the resource holding the credential.- Throws:
IllegalArgumentException- if theResourcedoes not exist.
-
-
Method Details
-
get
Description copied from interface:CredentialSupplierGet a credential to be used with an authentication mechanism.- Specified by:
getin interfaceCredentialSupplier- Specified by:
getin interfaceSupplier<String>- Returns:
- the credential.
-