pub struct JwtConfig {
pub secret: String,
pub public_key_pem: Option<String>,
pub key_id: Option<String>,
pub algorithm: Algorithm,
pub access_ttl_secs: u64,
pub refresh_ttl_secs: u64,
}Fields§
§secret: StringFor HMAC families (HS256/384/512): the raw shared secret. For RSA (RS*/PS*) and ECDSA (ES*) families: the PKCS#8 / SEC1 PEM private key used for signing.
public_key_pem: Option<String>PEM-encoded public key — required for RSA/ECDSA verification and for
publishing JWKS (JwtService::jwks_json). Ignored for HMAC families,
where the shared secret both signs and verifies.
key_id: Option<String>The kid (key ID) advertised in the JWT header and JWKS document.
Required for OIDC so relying parties can select the right JWK.
algorithm: AlgorithmSigning algorithm. Defaults to HS256.
access_ttl_secs: u64Lifetime of access tokens in seconds. Defaults to 900 (15 min).
refresh_ttl_secs: u64Lifetime of refresh tokens in seconds. Defaults to 604 800 (7 days).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JwtConfig
impl RefUnwindSafe for JwtConfig
impl Send for JwtConfig
impl Sync for JwtConfig
impl Unpin for JwtConfig
impl UnsafeUnpin for JwtConfig
impl UnwindSafe for JwtConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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