pub struct CliCallbackHandler;Expand description
Implementation of a cli callback handler
§Examples
Using the CliCallbackHandler will prompt the user via commandline for an action.
e.g. Browsing to an authentication URL and pasting back the redirect URL incl. authorization data.
use xal::{XalAuthenticator, Flows, Error, CliCallbackHandler};
let mut authenticator = XalAuthenticator::default();
let token_store = Flows::xbox_live_sisu_full_flow(
&mut authenticator,
CliCallbackHandler,
)
.await?;
Trait Implementations§
Source§impl AuthPromptCallback for CliCallbackHandler
impl AuthPromptCallback for CliCallbackHandler
Source§fn call<'life0, 'async_trait>(
&'life0 self,
cb_data: AuthPromptData,
) -> Pin<Box<dyn Future<Output = Result<Option<Url>, Box<dyn Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn call<'life0, 'async_trait>(
&'life0 self,
cb_data: AuthPromptData,
) -> Pin<Box<dyn Future<Output = Result<Option<Url>, Box<dyn Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Callback function that is called when the Authentication flow requires the user to perform interactive authentication via a webpage. Read more
Auto Trait Implementations§
impl Freeze for CliCallbackHandler
impl RefUnwindSafe for CliCallbackHandler
impl Send for CliCallbackHandler
impl Sync for CliCallbackHandler
impl Unpin for CliCallbackHandler
impl UnwindSafe for CliCallbackHandler
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