[][src]Struct imagevault::authentication::PinCodeAuthentication

pub struct PinCodeAuthentication { /* fields omitted */ }

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]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.