pub struct AccountManager<'a> { /* private fields */ }Expand description
Manages the lifecycle of an ACME account.
Implementations§
Source§impl<'a> AccountManager<'a>
impl<'a> AccountManager<'a>
Sourcepub fn new(
key_pair: &'a KeyPair,
nonce_manager: &'a NonceManager,
directory_manager: &'a DirectoryManager,
http_client: &'a Client,
) -> Result<Self>
pub fn new( key_pair: &'a KeyPair, nonce_manager: &'a NonceManager, directory_manager: &'a DirectoryManager, http_client: &'a Client, ) -> Result<Self>
Creates a new AccountManager with the provided dependencies.
Sourcepub async fn register(
&self,
contacts: Vec<Contact>,
terms_of_service_agreed: bool,
) -> Result<Account>
pub async fn register( &self, contacts: Vec<Contact>, terms_of_service_agreed: bool, ) -> Result<Account>
Registers a new account with the ACME server.
§Arguments
contacts- A list of contact information for the account.terms_of_service_agreed- Must be true to proceed with registration.
Sourcepub async fn update_contacts(
&self,
account_id: &str,
contacts: Vec<Contact>,
) -> Result<Account>
pub async fn update_contacts( &self, account_id: &str, contacts: Vec<Contact>, ) -> Result<Account>
Updates the contact information for an existing account.
Sourcepub async fn get_account(&self, account_id: &str) -> Result<Account>
pub async fn get_account(&self, account_id: &str) -> Result<Account>
Retrieves the current account information from the ACME server.
Sourcepub async fn deactivate(&self, account_id: &str) -> Result<()>
pub async fn deactivate(&self, account_id: &str) -> Result<()>
Deactivates the account on the ACME server. Once deactivated, the account cannot be used for further operations.
Computes the key authorization string for a given challenge token.
The format is token.jwk_thumbprint.
Sourcepub fn get_jwk_thumbprint(&self) -> Result<String>
pub fn get_jwk_thumbprint(&self) -> Result<String>
Returns the SHA-256 thumbprint of the account’s JSON Web Key (JWK).
Sourcepub fn get_signer(&self) -> &JwsSigner<'a>
pub fn get_signer(&self) -> &JwsSigner<'a>
Returns a reference to the JWS signer.
Auto Trait Implementations§
impl<'a> Freeze for AccountManager<'a>
impl<'a> !RefUnwindSafe for AccountManager<'a>
impl<'a> Send for AccountManager<'a>
impl<'a> Sync for AccountManager<'a>
impl<'a> Unpin for AccountManager<'a>
impl<'a> !UnwindSafe for AccountManager<'a>
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more