pub struct ChallengeHandler { /* private fields */ }Expand description
HTTP-01 challenge handler
Stores challenge tokens that need to be served at: GET /.well-known/acme-challenge/{token}
Implementations§
Source§impl ChallengeHandler
impl ChallengeHandler
Sourcepub async fn add_challenge(&self, token: String, key_authorization: String)
pub async fn add_challenge(&self, token: String, key_authorization: String)
Add a challenge token
Sourcepub async fn remove_challenge(&self, token: &str)
pub async fn remove_challenge(&self, token: &str)
Remove a challenge token
Get key authorization for a token
Sourcepub fn is_challenge_path(path: &str) -> bool
pub fn is_challenge_path(path: &str) -> bool
Check if path is an ACME challenge path
Sourcepub fn extract_token(path: &str) -> Option<&str>
pub fn extract_token(path: &str) -> Option<&str>
Extract token from challenge path Returns None if path is not a valid challenge path
Sourcepub async fn handle_challenge(&self, path: &str) -> Option<String>
pub async fn handle_challenge(&self, path: &str) -> Option<String>
Handle an ACME challenge request Returns the key authorization if found
Sourcepub async fn challenge_count(&self) -> usize
pub async fn challenge_count(&self) -> usize
Get number of active challenges
Trait Implementations§
Source§impl Clone for ChallengeHandler
impl Clone for ChallengeHandler
Source§fn clone(&self) -> ChallengeHandler
fn clone(&self) -> ChallengeHandler
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChallengeHandler
impl Debug for ChallengeHandler
Source§impl Default for ChallengeHandler
impl Default for ChallengeHandler
Source§fn default() -> ChallengeHandler
fn default() -> ChallengeHandler
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ChallengeHandler
impl !RefUnwindSafe for ChallengeHandler
impl Send for ChallengeHandler
impl Sync for ChallengeHandler
impl Unpin for ChallengeHandler
impl UnsafeUnpin for ChallengeHandler
impl !UnwindSafe for ChallengeHandler
Blanket Implementations§
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