Class PcfAuthentication
java.lang.Object
org.springframework.vault.authentication.PcfAuthentication
- All Implemented Interfaces:
AuthenticationStepsFactory,ClientAuthentication
public class PcfAuthentication
extends Object
implements ClientAuthentication, AuthenticationStepsFactory
PCF implementation of
ClientAuthentication. PcfAuthentication
uses a PCF instance certificate and key to login into Vault.
Requires BouncyCastle to generate a RSA PSS signature.
- Since:
- 2.2
- Author:
- Mark Paluch
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPcfAuthentication(PcfAuthenticationOptions options, VaultClient client) PcfAuthentication(PcfAuthenticationOptions options, RestClient client) PcfAuthentication(PcfAuthenticationOptions options, RestOperations restOperations) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionstatic AuthenticationStepsCreateAuthenticationStepsfor pcf authentication givenPcfAuthenticationOptions.Get theAuthenticationStepsdescribing an authentication flow.login()Obtain aVaultTokenfor authenticated Vault access.
-
Constructor Details
-
PcfAuthentication
@Deprecated(since="4.1") public PcfAuthentication(PcfAuthenticationOptions options, RestOperations restOperations) Deprecated.since 4.1, usePcfAuthentication(PcfAuthenticationOptions, VaultClient)instead.- Parameters:
options- must not be null.restOperations- must not be null.
-
PcfAuthentication
- Parameters:
options- must not be null.client- must not be null.- Since:
- 4.0
-
PcfAuthentication
- Parameters:
options- must not be null.client- must not be null.- Since:
- 4.1
-
-
Method Details
-
createAuthenticationSteps
CreateAuthenticationStepsfor pcf authentication givenPcfAuthenticationOptions.- Parameters:
options- must not be null.- Returns:
AuthenticationStepsfor pcf authentication.
-
login
Description copied from interface:ClientAuthenticationObtain aVaultTokenfor authenticated Vault access.This method may perform an authentication request to Vault or return a cached or pre-configured token.
- Specified by:
loginin interfaceClientAuthentication- Returns:
- the Vault token for subsequent authenticated requests
- Throws:
VaultLoginException- if authentication fails.VaultException- See Also:
-
getAuthenticationSteps
Description copied from interface:AuthenticationStepsFactoryGet theAuthenticationStepsdescribing an authentication flow.- Specified by:
getAuthenticationStepsin interfaceAuthenticationStepsFactory- Returns:
- the
AuthenticationStepsdescribing an authentication flow.
-
PcfAuthentication(PcfAuthenticationOptions, VaultClient)instead.