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 thepath
does not exist.
-
ResourceCredentialSupplier
- Parameters:
file
- path to the file holding the credential.- Throws:
IllegalArgumentException
- if thepath
does not exist.
-
ResourceCredentialSupplier
- Parameters:
resource
- resource pointing to the resource holding the credential.- Throws:
IllegalArgumentException
- if theResource
does not exist.
-
-
Method Details
-
get
Description copied from interface:CredentialSupplier
Get a credential to be used with an authentication mechanism.- Specified by:
get
in interfaceCredentialSupplier
- Specified by:
get
in interfaceSupplier<String>
- Returns:
- the credential.
-