pub struct CertIssuerHttpClient { /* private fields */ }
Expand description
An http client used to fetch certs dynamically (DynamicCertIssuer
).
There is no server implementation in Rama. It is up to the user of this client to provide their own server.
Implementations§
Source§impl CertIssuerHttpClient
impl CertIssuerHttpClient
Sourcepub fn new(endpoint: Uri) -> Self
pub fn new(endpoint: Uri) -> Self
Create a new CertIssuerHttpClient
using the default EasyHttpWebClient
.
pub fn try_from_env() -> Result<Self, OpaqueError>
Sourcepub fn new_with_client(
endpoint: Uri,
client: BoxService<Request, Response, OpaqueError>,
) -> Self
pub fn new_with_client( endpoint: Uri, client: BoxService<Request, Response, OpaqueError>, ) -> Self
Create a new CertIssuerHttpClient
using a custom http client.
The custom http client allows you to add whatever layers and client implementation you wish, to allow for custom headers, behaviour and security measures such as authorization.
Sourcepub fn with_allow_domain(self, domain: impl AsDomainRef) -> Self
pub fn with_allow_domain(self, domain: impl AsDomainRef) -> Self
Only allow fetching certs for the given domain.
By default, if none of the allow_*
setters are called
the client will fetch for any client.
Sourcepub fn set_allow_domain(&mut self, domain: impl AsDomainRef) -> &mut Self
pub fn set_allow_domain(&mut self, domain: impl AsDomainRef) -> &mut Self
Only allow fetching certs for the given domain.
By default, if none of the allow_*
setters are called
the client will fetch for any client.
Sourcepub fn with_allow_domains(
self,
domains: impl IntoIterator<Item: AsDomainRef>,
) -> Self
pub fn with_allow_domains( self, domains: impl IntoIterator<Item: AsDomainRef>, ) -> Self
Only allow fetching certs for the given domains.
By default, if none of the allow_*
setters are called
the client will fetch for any client.
Sourcepub fn set_allow_domains(
&mut self,
domains: impl IntoIterator<Item: AsDomainRef>,
) -> &mut Self
pub fn set_allow_domains( &mut self, domains: impl IntoIterator<Item: AsDomainRef>, ) -> &mut Self
Only allow fetching certs for the given domains.
By default, if none of the allow_*
setters are called
the client will fetch for any client.
Sourcepub fn prefetch_certs_in_background(&self, exec: &Executor)
pub fn prefetch_certs_in_background(&self, exec: &Executor)
Prefetch all certificates, useful to warm them up at startup time.
Trait Implementations§
Source§impl Debug for CertIssuerHttpClient
impl Debug for CertIssuerHttpClient
Source§impl DynamicCertIssuer for CertIssuerHttpClient
impl DynamicCertIssuer for CertIssuerHttpClient
fn issue_cert( &self, client_hello: ClientHello, _server_name: Option<Domain>, ) -> impl Future<Output = Result<ServerAuthData, OpaqueError>> + Send + Sync + '_
Auto Trait Implementations§
impl !Freeze for CertIssuerHttpClient
impl !RefUnwindSafe for CertIssuerHttpClient
impl Send for CertIssuerHttpClient
impl Sync for CertIssuerHttpClient
impl Unpin for CertIssuerHttpClient
impl !UnwindSafe for CertIssuerHttpClient
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§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<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy
that returns Action::Follow
only if self
and other
return
Action::Follow
. Read more