pub struct DapsClient<'a, C> { /* private fields */ }Expand description
The main struct of this crate. It provides the functionality to request and validate DAT tokens from a DAPS.
Implementations§
source§impl<C> DapsClient<'_, C>where
C: DapsClientRequest,
impl<C> DapsClient<'_, C>where
C: DapsClientRequest,
sourcepub fn new(config: DapsConfig<'_>) -> Self
pub fn new(config: DapsConfig<'_>) -> Self
Creates a new DAPS client based on the given configuration.
sourcepub async fn validate_dat(
&self,
token: &str,
) -> Result<TokenData<DatClaims>, DapsError>
pub async fn validate_dat( &self, token: &str, ) -> Result<TokenData<DatClaims>, DapsError>
Validates a DAT token against the DAPS.
sourcepub async fn request_dat(&self) -> Result<String, DapsError>
pub async fn request_dat(&self) -> Result<String, DapsError>
Requests a DAT token from the DAPS.
Auto Trait Implementations§
impl<'a, C> !Freeze for DapsClient<'a, C>
impl<'a, C> !RefUnwindSafe for DapsClient<'a, C>
impl<'a, C> Send for DapsClient<'a, C>where
C: Send,
impl<'a, C> !Sync for DapsClient<'a, C>
impl<'a, C> Unpin for DapsClient<'a, C>where
C: Unpin,
impl<'a, C> UnwindSafe for DapsClient<'a, C>where
C: UnwindSafe,
Blanket Implementations§
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