pub struct PasswordLoginConfig {
pub login_url: String,
pub format: PasswordLoginFormat,
pub username_field: Option<String>,
pub password_field: Option<String>,
pub totp_field: Option<String>,
pub extra_fields: Option<BTreeMap<String, String>>,
pub success_status: Option<Vec<u16>>,
}Expand description
Driver config for HTTP-POST proxy-login against a Password-kind
entry. Mirrors vault/_shared/0.1/vault-secret#/$defs/PasswordLoginConfig.
When this struct is present on a Password secret, the maintainer
performs an HTTP POST against login_url carrying the entry’s
credentials and captures the resulting Set-Cookie headers into the
SessionBlob. When absent, vault/proxy-login returns not_proxyable
and the consumer falls back to vault/release for a browser-fill
flow.
Fields§
§login_url: StringAbsolute URL the maintainer POSTs credentials to. MUST be
https:// for any non-loopback host — see the canonical spec
for the loopback carve-out.
format: PasswordLoginFormatRequest-body encoding. Json → application/json,
FormUrlEncoded → application/x-www-form-urlencoded.
username_field: Option<String>Field name carrying the username. Default "username".
password_field: Option<String>Field name carrying the password. Default "password".
totp_field: Option<String>Optional field name carrying the TOTP code. When set AND the
entry’s totp is populated, the maintainer computes the
current code and includes it in the request.
extra_fields: Option<BTreeMap<String, String>>Constant field/value pairs the maintainer MUST include
alongside the credentials. Useful for fixed selectors the site
expects (e.g. grantType: password).
success_status: Option<Vec<u16>>HTTP status codes the maintainer treats as login success.
Default [200, 204] (set via accessor when None — keeps the
wire shape clean).
Implementations§
Source§impl PasswordLoginConfig
impl PasswordLoginConfig
Sourcepub fn effective_success_status(&self) -> Vec<u16>
pub fn effective_success_status(&self) -> Vec<u16>
The set of HTTP statuses the maintainer treats as success,
falling back to the canonical default [200, 204] when the
caller didn’t override.
pub fn effective_username_field(&self) -> &str
pub fn effective_password_field(&self) -> &str
Trait Implementations§
Source§impl Clone for PasswordLoginConfig
impl Clone for PasswordLoginConfig
Source§fn clone(&self) -> PasswordLoginConfig
fn clone(&self) -> PasswordLoginConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PasswordLoginConfig
impl Debug for PasswordLoginConfig
Source§impl<'de> Deserialize<'de> for PasswordLoginConfig
impl<'de> Deserialize<'de> for PasswordLoginConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for PasswordLoginConfig
impl RefUnwindSafe for PasswordLoginConfig
impl Send for PasswordLoginConfig
impl Sync for PasswordLoginConfig
impl Unpin for PasswordLoginConfig
impl UnsafeUnpin for PasswordLoginConfig
impl UnwindSafe for PasswordLoginConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> BorrowUnordered for T
impl<T> BorrowUnordered for T
fn as_unordered(&self) -> &Unordered<T>
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<'de, T, C> DeserializeTyped<'de, C> for Twhere
T: Deserialize<'de>,
impl<'de, T, C> DeserializeTyped<'de, C> for Twhere
T: Deserialize<'de>,
fn deserialize_typed<S>(
_: &C,
deserializer: S,
) -> Result<T, <S as Deserializer<'de>>::Error>where
S: Deserializer<'de>,
impl<T, U> DeserializeTypedOwned<T> for Uwhere
U: for<'de> DeserializeTyped<'de, T>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T, U, C> IntoWithContext<U, C> for Twhere
U: FromWithContext<T, C>,
impl<T, U, C> IntoWithContext<U, C> for Twhere
U: FromWithContext<T, C>,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ResourceProvider<()> for T
impl<T> ResourceProvider<()> for T
Source§fn get_resource(&self) -> &()
fn get_resource(&self) -> &()
T.