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

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

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.