[][src]Struct acme2::Authorization

pub struct Authorization {
    pub identifier: Identifier,
    pub status: AuthorizationStatus,
    pub expires: Option<String>,
    pub challenges: Vec<Challenge>,
    pub wildcard: Option<bool>,
    // some fields omitted
}

An autorization represents the server's authorization of a certain domain being represented by an account.

Fields

identifier: Identifier

The identifier (domain) that the account is authorized to represent.

status: AuthorizationStatus

The status of this authorization.

expires: Option<String>

The timestamp after which the server will consider this authorization invalid.

challenges: Vec<Challenge>

For pending authorizations, the challenges that the client can fulfill in order to prove possession of the identifier. For valid authorizations, the challenge that was validated. For invalid authorizations, the challenge that was attempted and failed.

wildcard: Option<bool>

Whether this authorization was created for a wildcard identifier (domain).

Implementations

impl Authorization[src]

pub fn get_challenge(&self, r#type: &str) -> Option<Challenge>[src]

Get a certain type of challenge to complete.

Example: http-01, or dns-01

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

Update the authorization to match the current server state.

Most users should use Authorization::wait_done.

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

Wait for the authorization to go into a state other than AuthorizationStatus::Pending.

This will only happen once one of the challenges in an authorization is completed. You can use Challenge::wait_done to wait until this is the case.

Will complete immediately if the authorization is already in a state other than AuthorizationStatus::Pending.

Trait Implementations

impl Debug for Authorization[src]

impl<'de> Deserialize<'de> for Authorization[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, 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]