pub struct AuthConfig {
pub api_key: Option<String>,
pub secret_key: Option<String>,
}Expand description
Authentication configuration
Fields§
§api_key: Option<String>API key for X-Api-Key header
secret_key: Option<String>Secret key for JWT signing
Implementations§
Source§impl AuthConfig
impl AuthConfig
Sourcepub fn with_api_key(api_key: String) -> Self
pub fn with_api_key(api_key: String) -> Self
Create new auth config with API key only
Sourcepub fn with_secret_key(secret_key: String) -> Self
pub fn with_secret_key(secret_key: String) -> Self
Create new auth config with JWT secret key only
Trait Implementations§
Source§impl Clone for AuthConfig
impl Clone for AuthConfig
Source§fn clone(&self) -> AuthConfig
fn clone(&self) -> AuthConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AuthConfig
impl RefUnwindSafe for AuthConfig
impl Send for AuthConfig
impl Sync for AuthConfig
impl Unpin for AuthConfig
impl UnwindSafe for AuthConfig
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