pub struct DuoClient(/* private fields */);Implementations§
Source§impl DuoClient
impl DuoClient
pub fn new<D, I, S>(api_domain: D, ikey: I, skey: S) -> Result<DuoClient, Error>
pub fn new_with_client<C, D, I, S>( client: C, api_domain: D, ikey: I, skey: S, ) -> Result<DuoClient, Error>
pub fn auth( &self, data: AuthRequest, ) -> impl Future<Output = Result<String, Error>>
pub fn auth_status<S: Into<String>>( &self, tx_id: S, ) -> impl Future<Output = Result<AuthStatusResponse, Error>>
pub fn auth_wait( &self, data: AuthRequest, ) -> impl Future<Output = Result<bool, Box<dyn Error + Send + Sync>>>
pub fn check(&self) -> impl Future<Output = Result<u64, Error>>
pub fn enroll<U: Into<String>>( &self, username: Option<U>, valid_secs: Option<u64>, ) -> impl Future<Output = Result<EnrollResponse, Error>>
pub fn enroll_status<U: Into<String>, A: Into<String>>( &self, user_id: U, activation_code: A, ) -> impl Future<Output = Result<EnrollStatusResponse, Error>>
pub fn ping(&self) -> impl Future<Output = Result<u64, Error>>
pub fn preauth( &self, data: PreauthRequest, ) -> impl Future<Output = Result<PreauthResponse, Error>>
Auto Trait Implementations§
impl Freeze for DuoClient
impl !RefUnwindSafe for DuoClient
impl Send for DuoClient
impl Sync for DuoClient
impl Unpin for DuoClient
impl !UnwindSafe for DuoClient
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