Interface ManagedSecret.UsernamePassword
- All Superinterfaces:
ManagedSecret.SecretAccessor
- Enclosing class:
- ManagedSecret
Extension of
ManagedSecret.SecretAccessor to access username and password values.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceRepresents an operation that acceptsusernameandpassswordarguments and returns no result. -
Method Summary
Modifier and TypeMethodDescriptiondefault voidApply username and password to the given consumer.from(ManagedSecret.SecretAccessor accessor) Factory method to createUsernamePasswordfrom aManagedSecret.SecretAccessor.Return the password value.Return the username value.Methods inherited from interface org.springframework.vault.core.lease.ManagedSecret.SecretAccessor
as, get, get, getInt, getInt, getInt, getLong, getLong, getLong, getRequired, getRequiredString, getString, getString, getString
-
Method Details
-
getUsername
String getUsername()Return the username value.- Returns:
- the username value.
-
getPassword
CharSequence getPassword()Return the password value.- Returns:
- the password value.
-
applyTo
Apply username and password to the given consumer.- Parameters:
consumer- the username-password consumer.
-
from
Factory method to createUsernamePasswordfrom aManagedSecret.SecretAccessor.- Parameters:
accessor- the secret accessor.- Returns:
- a
UsernamePasswordinstance. - Throws:
IllegalStateException- if username or password are missing.
-