[−][src]Struct acme2::Challenge
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]
self,
poll_interval: Duration
) -> Result<Challenge, Error>
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]
pub fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl !RefUnwindSafe for Challenge
[src]
impl Send for Challenge
[src]
impl Sync for Challenge
[src]
impl Unpin for Challenge
[src]
impl !UnwindSafe for Challenge
[src]
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[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.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> WithSubscriber for T
[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,