pub struct FapiConfig {
pub issuer: String,
pub request_signing_algorithm: Algorithm,
pub response_signing_algorithm: Algorithm,
pub private_key: EncodingKey,
pub public_key: DecodingKey,
pub max_request_age: i64,
pub require_dpop: bool,
pub require_mtls: bool,
pub require_par: bool,
pub enable_jarm: bool,
pub enhanced_audit: bool,
pub is_degraded: bool,
}Expand description
FAPI 2.0 Configuration
Fields§
§issuer: StringIssuer identifier
request_signing_algorithm: AlgorithmRequest object signing algorithm (required: RS256, PS256, or ES256)
response_signing_algorithm: AlgorithmResponse signing algorithm
private_key: EncodingKeyPrivate key for signing
public_key: DecodingKeyPublic key for verification
max_request_age: i64Maximum request object age (seconds)
require_dpop: boolRequire DPoP for all requests
require_mtls: boolRequire mTLS for all requests
require_par: boolRequire PAR for authorization requests
enable_jarm: boolEnable JARM (JWT Secured Authorization Response Mode)
enhanced_audit: boolEnhanced audit logging
is_degraded: boolWhether the config is running in degraded mode (HMAC placeholder keys instead of the required RSA keys). FAPI operations MUST reject requests when this flag is true.
Implementations§
Source§impl FapiConfig
impl FapiConfig
Sourcepub fn builder(
issuer: impl Into<String>,
private_key: EncodingKey,
public_key: DecodingKey,
) -> FapiConfigBuilder
pub fn builder( issuer: impl Into<String>, private_key: EncodingKey, public_key: DecodingKey, ) -> FapiConfigBuilder
Create a new FAPI 2.0 configuration builder.
The builder enforces strict FAPI 2.0 compliance by default (DPoP, mTLS, PAR, JARM enabled).
Sourcepub fn load_from_env() -> Self
👎Deprecated since 0.5.0: use FapiConfig::from_env() instead
pub fn load_from_env() -> Self
use FapiConfig::from_env() instead
Load configuration from environment variables.
Trait Implementations§
Source§impl Clone for FapiConfig
impl Clone for FapiConfig
Source§fn clone(&self) -> FapiConfig
fn clone(&self) -> FapiConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FapiConfig
impl Debug for FapiConfig
Auto Trait Implementations§
impl Freeze for FapiConfig
impl RefUnwindSafe for FapiConfig
impl Send for FapiConfig
impl Sync for FapiConfig
impl Unpin for FapiConfig
impl UnsafeUnpin for FapiConfig
impl UnwindSafe for FapiConfig
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