pub struct DapsClient<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<C> !Freeze for DapsClient<C>
impl<C> !RefUnwindSafe for DapsClient<C>
impl<C> Send for DapsClient<C>where
C: Send,
impl<C> !Sync for DapsClient<C>
impl<C> Unpin for DapsClient<C>where
C: Unpin,
impl<C> UnwindSafe for DapsClient<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