pub struct AuthStep {
pub url: String,
pub method: String,
pub body: Option<Value>,
pub headers: HashMap<String, String>,
pub extract: Option<String>,
pub extract_refresh: Option<String>,
pub extract_expires_in: Option<String>,
pub inject_as: Option<InjectAs>,
}Expand description
One HTTP step in the auth flow.
Fields§
§url: StringFull URL to hit.
method: StringHTTP method (GET, POST, PUT…). Default: POST.
body: Option<Value>Optional JSON request body. Supports {{ENV_VAR}} substitution.
headers: HashMap<String, String>Optional extra headers for this step only.
extract: Option<String>JSONPath expression to extract the credential value from the response.
e.g. "$.data.access_token" or "$.access_token"
extract_refresh: Option<String>Where to extract the refresh token (optional).
extract_expires_in: Option<String>Where to extract expiry in seconds from now (optional).
e.g. "$.expires_in" — if absent, refresh_interval_secs is used.
inject_as: Option<InjectAs>How to inject the extracted value into all subsequent requests.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AuthStep
impl<'de> Deserialize<'de> for AuthStep
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AuthStep
impl RefUnwindSafe for AuthStep
impl Send for AuthStep
impl Sync for AuthStep
impl Unpin for AuthStep
impl UnsafeUnpin for AuthStep
impl UnwindSafe for AuthStep
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
Mutably borrows from an owned value. Read more