pub struct ChallengeRegistry { /* private fields */ }Expand description
The configured validators plus the settings the handlers need to apply them.
Cheap to clone behind the Arc it is always held in.
Implementations§
Source§impl ChallengeRegistry
impl ChallengeRegistry
Sourcepub fn new(
validators: Vec<Arc<dyn ChallengeValidator>>,
enabled: Vec<String>,
bypass: bool,
timeout: Duration,
) -> Self
pub fn new( validators: Vec<Arc<dyn ChallengeValidator>>, enabled: Vec<String>, bypass: bool, timeout: Duration, ) -> Self
Builds a registry directly from parts. Mostly useful to tests; production
goes through from_config.
Sourcepub fn enabled_types(&self) -> &[String]
pub fn enabled_types(&self) -> &[String]
The challenge types offered, in the order they were configured.
Sourcepub fn is_bypassed(&self) -> bool
pub fn is_bypassed(&self) -> bool
Whether triggering a challenge skips validation entirely.
Sourcepub fn types_for(&self, wildcard: bool) -> Vec<&str>
pub fn types_for(&self, wildcard: bool) -> Vec<&str>
The challenge types to create on a new authorization.
A wildcard can only be proved by dns-01 (RFC 8555 §8.4): control of one
host says nothing about the rest of the zone. The other types are
therefore filtered out for a wildcard authorization — possibly leaving
nothing, which the caller turns into a rejectedIdentifier rather
than creating an authorization no client could ever satisfy.
Sourcepub async fn validate(
&self,
typ: &str,
ctx: &ValidationContext<'_>,
) -> Result<(), ChallengeError>
pub async fn validate( &self, typ: &str, ctx: &ValidationContext<'_>, ) -> Result<(), ChallengeError>
Runs the validator for typ within the configured budget.
Trait Implementations§
Source§impl Debug for ChallengeRegistry
impl Debug for ChallengeRegistry
Source§impl Default for ChallengeRegistry
impl Default for ChallengeRegistry
Source§fn default() -> Self
fn default() -> Self
Bypassing, offering http-01 alone.
This is a test default and deliberately no longer matches
from_config(&ChallengeConfig::default()), which validates for real.
The server never reaches this impl — Profile::build_all always goes
through from_config — and a test suite that has no http-01 responder
on port 80 needs a registry that answers without one. The divergence is
pinned by the_test_default_bypasses_where_the_configured_default_does_not
so it stays a decision rather than a drift.
Auto Trait Implementations§
impl !RefUnwindSafe for ChallengeRegistry
impl !UnwindSafe for ChallengeRegistry
impl Freeze for ChallengeRegistry
impl Send for ChallengeRegistry
impl Sync for ChallengeRegistry
impl Unpin for ChallengeRegistry
impl UnsafeUnpin for ChallengeRegistry
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
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more