[][src]Struct yubirs::otp::request::Request

pub struct Request {
    pub client_id: String,
    pub otp: Otp,
    pub timestamp: bool,
    pub nonce: String,
    pub success_percentage: Option<SuccessPercentage>,
    pub timeout: Option<u64>,
    // some fields omitted
}

This structure denotes all of the parameters which comprise a verification API request.

Fields

client_id: Stringotp: Otptimestamp: boolnonce: Stringsuccess_percentage: Option<SuccessPercentage>timeout: Option<u64>

Methods

impl Request[src]

pub fn new(
    client_id: String,
    api_key: Vec<u8>,
    otp: Otp,
    timestamp: bool,
    success_percentage: Option<SuccessPercentage>,
    timeout: Option<u64>
) -> Result<Request>
[src]

Create a new request with the given parameters. More details on what the parameters mean are available in the official documentation: https://developers.yubico.com/OTP/Specifications/OTP_validation_protocol.html.

pub fn get_signature(&self) -> Result<String>[src]

Returns, as a base64-/percent-encoded string, the signature for this request.

Trait Implementations

impl Clone for Request[src]

impl Debug for Request[src]

impl Display for Request[src]

Auto Trait Implementations

impl RefUnwindSafe for Request

impl Send for Request

impl Sync for Request

impl Unpin for Request

impl UnwindSafe for Request

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,