pub struct DpopValidationConfig {
pub expected_http_method: Option<String>,
pub expected_http_uri: Option<String>,
pub expected_access_token_hash: Option<String>,
pub max_age_seconds: u64,
pub allow_future_iat: bool,
pub clock_skew_tolerance_seconds: u64,
pub expected_nonce_values: Vec<String>,
pub now: i64,
}
Expand description
Configuration for DPoP JWT validation.
This struct allows callers to specify what aspects of the DPoP JWT should be validated.
Fields§
§expected_http_method: Option<String>
Expected HTTP method (e.g., “POST”, “GET”). If None, method validation is skipped.
expected_http_uri: Option<String>
Expected HTTP URI. If None, URI validation is skipped.
expected_access_token_hash: Option<String>
Expected access token hash. If Some, the ath
claim must match this value.
max_age_seconds: u64
Maximum age of the token in seconds. Default is 60 seconds.
allow_future_iat: bool
Whether to allow tokens with future iat
times (for clock skew tolerance).
clock_skew_tolerance_seconds: u64
Clock skew tolerance in seconds (default 30 seconds).
expected_nonce_values: Vec<String>
Array of valid nonce values. If not empty, the nonce
claim must be present and match one of these values.
now: i64
Current timestamp for validation purposes.
Implementations§
Source§impl DpopValidationConfig
impl DpopValidationConfig
Create a new validation config for authorization requests (no access token hash required).
Sourcepub fn for_resource_request(
http_method: &str,
http_uri: &str,
access_token: &str,
) -> Self
pub fn for_resource_request( http_method: &str, http_uri: &str, access_token: &str, ) -> Self
Create a new validation config for resource requests (access token hash required).
Trait Implementations§
Source§impl Clone for DpopValidationConfig
impl Clone for DpopValidationConfig
Source§fn clone(&self) -> DpopValidationConfig
fn clone(&self) -> DpopValidationConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more