#[non_exhaustive]pub struct JwtCacheConfig {
pub enabled: bool,
pub max_entries: usize,
pub max_ttl_secs: u64,
pub max_token_bytes: usize,
}Expand description
auth.jwt.cache: verified claims are reused until the earlier of the
token’s exp and max_ttl_secs after verification. Applies to the
built-in verifier only; an injected TokenVerifier is called every time.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.enabled: boolCache verified tokens. Default: true.
max_entries: usizeMost tokens kept at once; once full with live entries, a new token is verified but not stored. Default: 10000.
max_ttl_secs: u64Longest time a verification is reused, in seconds. With
jwks_max_age_secs it bounds how long a token keeps passing after its
signing key leaves the JWKS. Default: 60.
max_token_bytes: usizeLongest token cached, in bytes; a longer one is verified on every
request. With max_entries it bounds the memory the cache holds, since
the claims kept are decoded from the token. Default: 4096.
Trait Implementations§
Source§impl Clone for JwtCacheConfig
impl Clone for JwtCacheConfig
Source§impl Debug for JwtCacheConfig
impl Debug for JwtCacheConfig
Source§impl Default for JwtCacheConfig
impl Default for JwtCacheConfig
Source§impl<'de> Deserialize<'de> for JwtCacheConfig
impl<'de> Deserialize<'de> for JwtCacheConfig
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 JwtCacheConfig
impl RefUnwindSafe for JwtCacheConfig
impl Send for JwtCacheConfig
impl Sync for JwtCacheConfig
impl Unpin for JwtCacheConfig
impl UnsafeUnpin for JwtCacheConfig
impl UnwindSafe for JwtCacheConfig
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request