[−][src]Struct imagevault::authentication::PinCodeAuthentication
Methods
impl PinCodeAuthentication
[src]
pub fn new(activate_url: fn(activate_url: &Url)) -> Self
[src]
Creates a new PinCodeAuthentication
Arguments
activate_url
-PinCodeAuthentication
is an interactive authentication method. This function will be called with a URL that needs to be visited by a user in order to authenticate. When the user has acknowledged by visiting the URL and logging in, authentication will complete.
Example
use imagevault::authentication::PinCodeAuthentication; use url::Url; let auth = PinCodeAuthentication::new(activate_url); // This is called with a URL the user needs to visit, // login and acknowledge the client. fn activate_url(url: &Url) { println!("Login to authenticate this client: {}", url); }
Remarks
The Pin request for authentication is only valid for a limited time. If the user has not visited the URL and logged in for about 5 minutes, the authentication will time out and fail.
Trait Implementations
impl Authentication for PinCodeAuthentication
[src]
fn authenticate<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 mut self,
client_identity: &'life1 str,
client_secret: &'life2 str,
base_url: &'life3 Url,
reqwest_client: &'life4 Client
) -> Pin<Box<dyn Future<Output = Result<String, Box<dyn Error>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
client_identity: &'life1 str,
client_secret: &'life2 str,
base_url: &'life3 Url,
reqwest_client: &'life4 Client
) -> Pin<Box<dyn Future<Output = Result<String, Box<dyn Error>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
Auto Trait Implementations
impl RefUnwindSafe for PinCodeAuthentication
impl Send for PinCodeAuthentication
impl Sync for PinCodeAuthentication
impl Unpin for PinCodeAuthentication
impl UnwindSafe for PinCodeAuthentication
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,