pub struct AuthorizationHandle<'a> { /* private fields */ }Expand description
An ACME authorization as described in RFC 8555 (section 7.1.4)
Authorizations are retrieved from an associated Order by calling
Order::authorizations(). This type dereferences to the underlying
AuthorizationState for easy access to the authorization’s state.
For each authorization, you’ll need to:
- Select which
ChallengeTypeyou want to complete - Call
AuthorizationHandle::challenge()to get aChallengeHandle - Use the
ChallengeHandleto complete the authorization’s challenge
Implementations§
Source§impl<'a> AuthorizationHandle<'a>
impl<'a> AuthorizationHandle<'a>
Sourcepub async fn refresh(&mut self) -> Result<&AuthorizationState, Error>
pub async fn refresh(&mut self) -> Result<&AuthorizationState, Error>
Refresh the current state of the authorization
Sourcepub async fn deactivate(&mut self) -> Result<&AuthorizationState, Error>
pub async fn deactivate(&mut self) -> Result<&AuthorizationState, Error>
Deactivate a pending or valid authorization
Returns the updated AuthorizationState if the deactivation was successful.
If the authorization was not pending or valid, an error is returned.
Once deactivated the authorization and associated challenges can not be updated further.
This is useful when you want to cancel a pending authorization attempt you wish to abandon, or if you wish to revoke valid authorization for an identifier to force future uses of the identifier by the same ACME account to require re-verification with fresh authorizations/challenges.
Sourcepub fn challenge(
&'a mut self,
type: ChallengeType,
) -> Option<ChallengeHandle<'a>>
pub fn challenge( &'a mut self, type: ChallengeType, ) -> Option<ChallengeHandle<'a>>
Get a ChallengeHandle for the given type
Yields an object to interact with the challenge for the given type, if available.
Methods from Deref<Target = AuthorizationState>§
Sourcepub fn identifier(&self) -> AuthorizedIdentifier<'_>
pub fn identifier(&self) -> AuthorizedIdentifier<'_>
Creates an AuthorizedIdentifier for the identifier in this authorization