[−][src]Struct yubirs::otp::result::VerificationResult
This structure provides type-safe access to all of the fields which may appear in a response / verification result from the Yubico API. More details on what the fields mean are in the official documentation: https://developers.yubico.com/OTP/Specifications/OTP_validation_protocol.html.
Fields
otp: Option<String>
nonce: Option<String>
signature: Vec<u8>
timestamp: DateTime<Utc>
status: Status
decrypted_timestamp: Option<String>
decrypted_use_counter: Option<String>
decrypted_session_use_counter: Option<String>
success_percent: Option<u8>
Methods
impl VerificationResult
[src]
pub fn new(
api_key: &[u8],
expected_otp: &Otp,
expected_nonce: &str,
response: Vec<u8>
) -> Result<VerificationResult>
[src]
api_key: &[u8],
expected_otp: &Otp,
expected_nonce: &str,
response: Vec<u8>
) -> Result<VerificationResult>
Parse the given raw HTTP response into a result structure. Use the other pieces of information to verify that the response is valid (i.e., the contents and signature match what we expect).
pub fn is_valid(&self) -> bool
[src]
Returns true if and only if the result indicates that the OTP was successfully verified.
pub fn is_retryable_error(&self) -> bool
[src]
Returns true if this error is retryable (i.e., the request may actually succeed if we try it again).
Trait Implementations
impl Clone for VerificationResult
[src]
fn clone(&self) -> VerificationResult
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for VerificationResult
[src]
Auto Trait Implementations
impl RefUnwindSafe for VerificationResult
impl Send for VerificationResult
impl Sync for VerificationResult
impl Unpin for VerificationResult
impl UnwindSafe for VerificationResult
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,