pub struct ApiKeyConfig {Show 18 fields
pub config_id: String,
pub references: ApiKeyReferences,
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§
§config_id: StringName of this configuration, stored on every key it creates.
Upstream defaults it to "default".
references: ApiKeyReferencesWhether keys from this configuration belong to a user or to an organization.
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§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<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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