pub enum AuthSpec {
None,
Bearer {
field: String,
},
Basic {
username: String,
password: String,
},
Header {
name: String,
template: String,
},
Query {
param: String,
field: String,
},
AwsV4 {
access_key: String,
secret_key: String,
region: String,
service: String,
},
}Expand description
How to attach the credential to the verification request.
The field values are interpolation references:
"match"— the primary matched credential"companion.<name>"— a companion match- anything else — literal string
§Examples
use keyhog_core::AuthSpec;
let auth = AuthSpec::Bearer { field: "match".into() };
assert!(matches!(auth, AuthSpec::Bearer { .. }));Variants§
None
Send the request without explicit auth decoration.
Bearer
Put the resolved credential in an Authorization: Bearer header.
Basic
Send HTTP basic auth.
Header
Put the credential into a custom header.
Query
Put the credential into a query parameter.
Fields
AwsV4
Use a lightweight AWS SigV4 liveness probe.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AuthSpec
impl<'de> Deserialize<'de> for AuthSpec
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 AuthSpec
impl RefUnwindSafe for AuthSpec
impl Send for AuthSpec
impl Sync for AuthSpec
impl Unpin for AuthSpec
impl UnsafeUnpin for AuthSpec
impl UnwindSafe for AuthSpec
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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 more