[][src]Struct openidconnect::Nonce

pub struct Nonce(_);

String value used to associate a client session with an ID Token, and to mitigate replay attacks.

Methods

impl Nonce[src]

pub fn new_random() -> Self[src]

Generate a new random, base64-encoded 128-bit nonce.

pub fn new_random_len(num_bytes: u32) -> Self[src]

Generate a new random, base64-encoded nonce of the specified length.

Arguments

  • num_bytes - Number of random bytes to generate, prior to base64-encoding.

pub fn new(s: String) -> Self[src]

Create a new Nonce to wrap the given String.

pub fn secret(&self) -> &String[src]

Get the secret contained within this Nonce.

Security Warning

Leaking this value may compromise the security of the OAuth2 flow.

Trait Implementations

impl<'a, '_> NonceVerifier<'a> for &'_ Nonce[src]

impl Clone for Nonce[src]

impl PartialEq<Nonce> for Nonce[src]

impl Debug for Nonce[src]

impl Serialize for Nonce[src]

impl<'de> Deserialize<'de> for Nonce[src]

Auto Trait Implementations

impl Unpin for Nonce

impl Sync for Nonce

impl Send for Nonce

impl UnwindSafe for Nonce

impl RefUnwindSafe for Nonce

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

impl<T> From<T> for 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.

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

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

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

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Erased for T

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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