pub struct DpopManager { /* private fields */ }
Expand description
DPoP manager for handling proof-of-possession
Implementations§
Source§impl DpopManager
impl DpopManager
Sourcepub fn new(_jwt_validator: SecureJwtValidator) -> Self
pub fn new(_jwt_validator: SecureJwtValidator) -> Self
Create a new DPoP manager
Sourcepub async fn validate_dpop_proof(
&self,
dpop_proof: &str,
http_method: &str,
http_uri: &str,
access_token: Option<&str>,
expected_nonce: Option<&str>,
) -> Result<DpopValidationResult>
pub async fn validate_dpop_proof( &self, dpop_proof: &str, http_method: &str, http_uri: &str, access_token: Option<&str>, expected_nonce: Option<&str>, ) -> Result<DpopValidationResult>
Validate a DPoP proof JWT
Sourcepub fn create_dpop_confirmation(
&self,
public_key_jwk: &Value,
) -> Result<DpopConfirmation>
pub fn create_dpop_confirmation( &self, public_key_jwk: &Value, ) -> Result<DpopConfirmation>
Create DPoP confirmation for access token
Sourcepub fn validate_dpop_bound_token(
&self,
token_confirmation: &DpopConfirmation,
dpop_proof_jwk: &Value,
) -> Result<bool>
pub fn validate_dpop_bound_token( &self, token_confirmation: &DpopConfirmation, dpop_proof_jwk: &Value, ) -> Result<bool>
Validate DPoP-bound access token
Sourcepub async fn validate_dpop_bound_access_token(
&self,
access_token: &str,
token_confirmation: &DpopConfirmation,
dpop_proof: &str,
http_method: &str,
http_uri: &str,
) -> Result<bool>
pub async fn validate_dpop_bound_access_token( &self, access_token: &str, token_confirmation: &DpopConfirmation, dpop_proof: &str, http_method: &str, http_uri: &str, ) -> Result<bool>
Comprehensive validation of DPoP-bound access token with JWT validation
Sourcepub fn generate_nonce(&self) -> String
pub fn generate_nonce(&self) -> String
Generate a nonce for DPoP proof
Sourcepub async fn cleanup_expired_nonces(&self)
pub async fn cleanup_expired_nonces(&self)
Clean up expired nonces
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for DpopManager
impl !RefUnwindSafe for DpopManager
impl Send for DpopManager
impl Sync for DpopManager
impl Unpin for DpopManager
impl !UnwindSafe for DpopManager
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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