pub enum CredentialSource {
AuthorizationHeader,
QueryParam {
param: String,
},
Cookie {
name: String,
},
Header {
name: String,
},
}Expand description
Source from which a token can be extracted.
exhaustive-by-contract: closed source set; out-of-crate camel-auth extraction matches all variants, so adding a source must update every match site by review.
Variants§
AuthorizationHeader
Extract from the Authorization header (Bearer scheme).
QueryParam
Extract from a query parameter with the given name.
Cookie
Extract from a cookie with the given name.
Header
Extract from a named request header (API-key style).
The extracted value flows into the same constant-time
NativeCredentialStore::lookup as every other source.
ApiKeyAuthenticator is superseded for YAML use; its programmatic API
stays.
Implementations§
Source§impl CredentialSource
impl CredentialSource
Sourcepub fn variant_name(&self) -> &'static str
pub fn variant_name(&self) -> &'static str
Returns the variant name without exposing sensitive values.
Trait Implementations§
Source§impl Clone for CredentialSource
impl Clone for CredentialSource
Source§fn clone(&self) -> CredentialSource
fn clone(&self) -> CredentialSource
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CredentialSource
impl Debug for CredentialSource
impl Eq for CredentialSource
Source§impl PartialEq for CredentialSource
impl PartialEq for CredentialSource
impl StructuralPartialEq for CredentialSource
Auto Trait Implementations§
impl Freeze for CredentialSource
impl RefUnwindSafe for CredentialSource
impl Send for CredentialSource
impl Sync for CredentialSource
impl Unpin for CredentialSource
impl UnsafeUnpin for CredentialSource
impl UnwindSafe for CredentialSource
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