Struct imagevault::authentication::PinCodeAuthentication [−][src]
pub struct PinCodeAuthentication { /* fields omitted */ }
Implementations
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
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, ImageVaultError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
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, ImageVaultError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
Authenticate is called from the ImageVault Client
whenever a request requiring authentication is made.
It shouldn’t be called directly. Read more
Auto Trait Implementations
impl RefUnwindSafe for PinCodeAuthentication
impl Send for PinCodeAuthentication
impl Sync for PinCodeAuthentication
impl Unpin for PinCodeAuthentication
impl UnwindSafe for PinCodeAuthentication