#[non_exhaustive]pub struct RequestAuth {
pub placements: Vec<CredentialPlacement>,
pub base_url: Option<String>,
pub captured: BTreeMap<String, String>,
}Expand description
The per-request auth a provider contributes beyond a single Credential:
zero or more CredentialPlacements plus an optional dynamic base-URL that
overrides the connector’s configured one (captured from a login response —
Bullhorn restUrl, Zoho region host, #511).
A connector that receives a non-is_empty
RequestAuth uses it instead of the plain credential
path for that request. #[non_exhaustive]: construct via RequestAuth::new
and the builder methods so fields can be added as a minor change.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.placements: Vec<CredentialPlacement>Credential placements to apply to the request.
base_url: Option<String>Optional per-session base-URL override.
captured: BTreeMap<String, String>Values captured by a multi-step login (name → value), exposed so a
connector can substitute ${name} tokens into a raw request body
(or header) string — an XML/SOAP gateway that must carry a captured
sessionid inside its body, which no CredentialPlacement can express
(#567). These are the same captured values the flow’s apply placements
draw from; secret-bearing, so a connector must treat them as sensitive.
Implementations§
Source§impl RequestAuth
impl RequestAuth
Sourcepub fn with_placement(self, placement: CredentialPlacement) -> Self
pub fn with_placement(self, placement: CredentialPlacement) -> Self
Add a credential placement (builder).
Sourcepub fn with_base_url(self, base_url: impl Into<String>) -> Self
pub fn with_base_url(self, base_url: impl Into<String>) -> Self
Set the dynamic base-URL override (builder).
Sourcepub fn with_captured(self, captured: BTreeMap<String, String>) -> Self
pub fn with_captured(self, captured: BTreeMap<String, String>) -> Self
Attach the captured login values (name → value) for ${name} body/header
substitution (builder, #567).
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
True when the provider contributed nothing (the connector then falls back
to the plain credential path).
Trait Implementations§
Source§impl Clone for RequestAuth
impl Clone for RequestAuth
Source§fn clone(&self) -> RequestAuth
fn clone(&self) -> RequestAuth
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 RequestAuth
impl Debug for RequestAuth
Source§impl Default for RequestAuth
impl Default for RequestAuth
Source§fn default() -> RequestAuth
fn default() -> RequestAuth
Auto Trait Implementations§
impl Freeze for RequestAuth
impl RefUnwindSafe for RequestAuth
impl Send for RequestAuth
impl Sync for RequestAuth
impl Unpin for RequestAuth
impl UnsafeUnpin for RequestAuth
impl UnwindSafe for RequestAuth
Blanket Implementations§
impl<T> Allocation for T
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request