pub struct JwtConfig {
pub decoding_key: DecodingKey,
pub encoding_key: Option<EncodingKey>,
pub algorithm: Algorithm,
pub required_issuer: Option<String>,
pub accepted_audiences: Vec<String>,
pub leeway_secs: u64,
pub public_key_pem: Option<Vec<u8>>,
}Expand description
Configuration for JWT validation and (optionally) issuance.
Fields§
§decoding_key: DecodingKeyPublic key for validation.
encoding_key: Option<EncodingKey>Private key for issuance (only on orchestrator).
algorithm: AlgorithmSigning algorithm (ES256 or HS256).
required_issuer: Option<String>Expected iss claim (optional — skipped if None).
accepted_audiences: Vec<String>Accepted aud claim values. A token whose aud matches any entry
in this list passes audience validation; the per-tool scope check
downstream still gates the actual call.
Single-element vec preserves v0.7.x single-audience behaviour. For
multi-audience deployments (e.g. proxy accepting both ati-proxy and
per-MCP-audience tokens — see issue #121), populate from
ATI_JWT_ACCEPTED_AUDIENCES (CSV env var).
leeway_secs: u64Clock skew tolerance in seconds.
public_key_pem: Option<Vec<u8>>Raw public key PEM bytes (for JWKS endpoint).
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