pub struct ApiKeyConfig {Show 16 fields
pub key_length: usize,
pub prefix: Option<String>,
pub default_remaining: Option<i64>,
pub api_key_header: String,
pub disable_key_hashing: bool,
pub starting_characters_length: usize,
pub store_starting_characters: bool,
pub max_prefix_length: usize,
pub min_prefix_length: usize,
pub max_name_length: usize,
pub min_name_length: usize,
pub require_name: bool,
pub enable_metadata: bool,
pub key_expiration: KeyExpirationConfig,
pub rate_limit: RateLimitDefaults,
pub enable_session_for_api_keys: bool,
}Expand description
Configuration for the API Key plugin, aligned with the TypeScript ApiKeyOptions.
Fields§
§key_length: usize§prefix: Option<String>§default_remaining: Option<i64>§api_key_header: String§disable_key_hashing: bool§starting_characters_length: usize§store_starting_characters: bool§max_prefix_length: usize§min_prefix_length: usize§max_name_length: usize§min_name_length: usize§require_name: bool§enable_metadata: bool§key_expiration: KeyExpirationConfig§rate_limit: RateLimitDefaults§enable_session_for_api_keys: boolTrait Implementations§
Source§impl Clone for ApiKeyConfig
impl Clone for ApiKeyConfig
Source§fn clone(&self) -> ApiKeyConfig
fn clone(&self) -> ApiKeyConfig
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 moreSource§impl Debug for ApiKeyConfig
impl Debug for ApiKeyConfig
Auto Trait Implementations§
impl Freeze for ApiKeyConfig
impl RefUnwindSafe for ApiKeyConfig
impl Send for ApiKeyConfig
impl Sync for ApiKeyConfig
impl Unpin for ApiKeyConfig
impl UnsafeUnpin for ApiKeyConfig
impl UnwindSafe for ApiKeyConfig
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