pub struct MutualTlsManager { /* private fields */ }Expand description
Mutual TLS manager for OAuth 2.0
Implementations§
Source§impl MutualTlsManager
impl MutualTlsManager
Sourcepub fn add_ca_certificate(&mut self, ca_cert: Vec<u8>) -> Result<()>
pub fn add_ca_certificate(&mut self, ca_cert: Vec<u8>) -> Result<()>
Add a trusted CA certificate
Sourcepub async fn register_client(&self, config: MutualTlsClientConfig) -> Result<()>
pub async fn register_client(&self, config: MutualTlsClientConfig) -> Result<()>
Register a client for Mutual TLS authentication
Sourcepub async fn authenticate_client(
&self,
client_id: &str,
client_certificate: &[u8],
) -> Result<MutualTlsAuthResult>
pub async fn authenticate_client( &self, client_id: &str, client_certificate: &[u8], ) -> Result<MutualTlsAuthResult>
Authenticate a client using Mutual TLS
Sourcepub fn create_certificate_confirmation(
&self,
client_certificate: &[u8],
) -> Result<CertificateConfirmation>
pub fn create_certificate_confirmation( &self, client_certificate: &[u8], ) -> Result<CertificateConfirmation>
Create certificate-bound access token confirmation
Sourcepub fn validate_certificate_bound_token(
&self,
token_confirmation: &CertificateConfirmation,
client_certificate: &[u8],
) -> Result<bool>
pub fn validate_certificate_bound_token( &self, token_confirmation: &CertificateConfirmation, client_certificate: &[u8], ) -> Result<bool>
Validate certificate-bound access token
Trait Implementations§
Source§impl Debug for MutualTlsManager
impl Debug for MutualTlsManager
Auto Trait Implementations§
impl !Freeze for MutualTlsManager
impl !RefUnwindSafe for MutualTlsManager
impl Send for MutualTlsManager
impl Sync for MutualTlsManager
impl Unpin for MutualTlsManager
impl !UnwindSafe for MutualTlsManager
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