pub struct AdvancedJarmConfig {Show 15 fields
pub supported_algorithms: Vec<Algorithm>,
pub default_token_expiry: Duration,
pub enable_jwe_encryption: bool,
pub supported_delivery_modes: Vec<JarmDeliveryMode>,
pub enable_custom_claims: bool,
pub max_custom_claims: usize,
pub enable_response_validation: bool,
pub jarm_issuer: String,
pub enable_audit_logging: bool,
pub jwe_algorithm: Option<String>,
pub jwe_content_encryption: Option<String>,
pub rsa_private_key_pem: Option<String>,
pub rsa_public_key_pem: Option<String>,
pub jwe_recipient_public_key_pem: Option<String>,
pub jwe_recipient_private_key_pem: Option<String>,
}Expand description
Advanced JARM configuration
Fields§
§supported_algorithms: Vec<Algorithm>Supported signing algorithms
default_token_expiry: DurationDefault token expiry
enable_jwe_encryption: boolEnable JWE encryption for nested JWT
supported_delivery_modes: Vec<JarmDeliveryMode>Supported delivery modes
enable_custom_claims: boolEnable custom claims
max_custom_claims: usizeMaximum custom claims count
enable_response_validation: boolEnable response validation
jarm_issuer: StringJWT issuer for JARM tokens
enable_audit_logging: boolEnable audit logging
jwe_algorithm: Option<String>Encryption algorithm for JWE
jwe_content_encryption: Option<String>Content encryption algorithm
rsa_private_key_pem: Option<String>PEM-encoded RSA private key used to sign JARM tokens.
If None, the lookup falls back to the JARM_RSA_PRIVATE_KEY_PEM
environment variable before resorting to a development-only symmetric
key (which triggers a visible SECURITY WARNING log entry).
rsa_public_key_pem: Option<String>PEM-encoded RSA public key (or certificate) used to verify incoming JARM tokens.
If None, falls back to JARM_RSA_PUBLIC_KEY_PEM env var then the
same symmetric dev fallback as rsa_private_key_pem.
jwe_recipient_public_key_pem: Option<String>PEM-encoded RSA public key of the JWE recipient (the client).
When enable_jwe_encryption is true the server wraps the CEK with
this key using RSA-OAEP-SHA-256. If None, falls back to the
JARM_JWE_RECIPIENT_PUBLIC_KEY_PEM environment variable.
jwe_recipient_private_key_pem: Option<String>PEM-encoded RSA private key for JWE CEK unwrapping.
Used when the server acts as a JWE recipient (rare, but required for
full round-trip tests). If None, falls back to
JARM_JWE_RECIPIENT_PRIVATE_KEY_PEM.
Implementations§
Source§impl AdvancedJarmConfig
impl AdvancedJarmConfig
Sourcepub fn builder() -> AdvancedJarmConfigBuilder
pub fn builder() -> AdvancedJarmConfigBuilder
Create a builder starting from the default configuration.
§Example
use auth_framework::server::oidc::oidc_advanced_jarm::AdvancedJarmConfig;
let config = AdvancedJarmConfig::builder()
.jarm_issuer("https://auth.example.com")
.enable_jwe_encryption(true)
.build();Trait Implementations§
Source§impl Clone for AdvancedJarmConfig
impl Clone for AdvancedJarmConfig
Source§fn clone(&self) -> AdvancedJarmConfig
fn clone(&self) -> AdvancedJarmConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AdvancedJarmConfig
impl Debug for AdvancedJarmConfig
Auto Trait Implementations§
impl Freeze for AdvancedJarmConfig
impl RefUnwindSafe for AdvancedJarmConfig
impl Send for AdvancedJarmConfig
impl Sync for AdvancedJarmConfig
impl Unpin for AdvancedJarmConfig
impl UnsafeUnpin for AdvancedJarmConfig
impl UnwindSafe for AdvancedJarmConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more