Class PcfAuthenticationOptions.PcfAuthenticationOptionsBuilder
java.lang.Object
org.springframework.vault.authentication.PcfAuthenticationOptions.PcfAuthenticationOptionsBuilder
- Enclosing class:
- PcfAuthenticationOptions
Builder for
PcfAuthenticationOptions
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build a newPcfAuthenticationOptions
instance.Configure theClock
.instanceCertificate
(Supplier<String> instanceCertSupplier) Configure theSupplier
to obtain the instance certificate.instanceKey
(Supplier<String> instanceKeySupplier) Configure theSupplier
to obtain the instance key.Configure the mount path.Configure the role.
-
Method Details
-
path
Configure the mount path.- Parameters:
path
- must not be empty or null.- Returns:
this
PcfAuthenticationOptions.PcfAuthenticationOptionsBuilder
.- See Also:
-
role
Configure the role.- Parameters:
role
- name of the role against which the login is being attempted, must not be null or empty.- Returns:
this
PcfAuthenticationOptions.PcfAuthenticationOptionsBuilder
.
-
clock
Configure theClock
.- Parameters:
clock
- must not be null.- Returns:
this
PcfAuthenticationOptions.PcfAuthenticationOptionsBuilder
.
-
instanceCertificate
public PcfAuthenticationOptions.PcfAuthenticationOptionsBuilder instanceCertificate(Supplier<String> instanceCertSupplier) Configure theSupplier
to obtain the instance certificate.- Parameters:
instanceCertSupplier
- the supplier, must not be null.- Returns:
this
PcfAuthenticationOptions.PcfAuthenticationOptionsBuilder
.- See Also:
-
instanceKey
public PcfAuthenticationOptions.PcfAuthenticationOptionsBuilder instanceKey(Supplier<String> instanceKeySupplier) Configure theSupplier
to obtain the instance key.- Parameters:
instanceKeySupplier
- the supplier, must not be null.- Returns:
this
PcfAuthenticationOptions.PcfAuthenticationOptionsBuilder
.- See Also:
-
build
Build a newPcfAuthenticationOptions
instance.Falls back to the instance certificate at
CF_INSTANCE_CERT
ifinstanceCertificate(Supplier)
is not configured respectiveCF_INSTANCE_KEY
ifinstanceKey(Supplier)
is not configured.- Returns:
- a new
PcfAuthenticationOptions
. - Throws:
IllegalStateException
- ifinstanceCertificate(Supplier)
orinstanceKey(Supplier)
are not set and the corresponding environment variableCF_INSTANCE_CERT
respectiveCF_INSTANCE_KEY
is not set.
-