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 more