[][src]Struct acme2::Challenge

pub struct Challenge {
    pub type: String,
    pub status: ChallengeStatus,
    pub validated: Option<String>,
    pub error: Option<AcmeError>,
    pub token: Option<String>,
    // some fields omitted
}

A challenge represents a means for the server to validate that an account has control over an identifier (domain).

A challenge can only be acquired through an Authorization.

Fields

type: String

The type of challenge encoded in the object.

status: ChallengeStatus

The status of this challenge.

validated: Option<String>

The time at which the server validated this challenge.

error: Option<AcmeError>

Error that occurred while the server was validating the challenge, if any.

token: Option<String>

A random value that uniquely identifies the challenge.

Implementations

impl Challenge[src]

pub fn key_authorization(&self) -> Result<Option<String>, Error>[src]

The key authorization is the token that the HTTP01, or DNS01

pub async fn validate(&self) -> Result<Challenge, Error>[src]

Initiate validation of the challenge by the ACME server.

Before calling this method, you should have set up your challenge token so it is available for the ACME server to check.

In most cases this will not complete immediately. You should always call Challenge::wait_done after this operation to wait until the ACME server has finished validation.

pub async fn poll(&self) -> Result<Challenge, Error>[src]

Update the challenge to match the current server state.

Most users should use Challenge::wait_done.

pub async fn wait_done(
    self,
    poll_interval: Duration
) -> Result<Challenge, Error>
[src]

Wait for the authorization to go into the AuthorizationStatus::Valid or AuthorizationStatus::Invalid state.

Will complete immediately if the authorization is already in one of these states.

Trait Implementations

impl Clone for Challenge[src]

impl Debug for Challenge[src]

impl<'de> Deserialize<'de> for Challenge[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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

impl<T> Instrument for T[src]

impl<T> Instrument 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, 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> WithSubscriber for T[src]