pub struct MiddlewareBasicAuth {
pub header_field: Option<String>,
pub realm: Option<String>,
pub remove_header: Option<bool>,
pub secret: Option<String>,
}
Expand description
BasicAuth holds the basic auth middleware configuration. This middleware restricts access to your services to known users. More info: https://doc.traefik.io/traefik/v3.3/middlewares/http/basicauth/
Fields§
§header_field: Option<String>
HeaderField defines a header field to store the authenticated user. More info: https://doc.traefik.io/traefik/v3.3/middlewares/http/basicauth/#headerfield
realm: Option<String>
Realm allows the protected resources on a server to be partitioned into a set of protection spaces, each with its own authentication scheme. Default: traefik.
remove_header: Option<bool>
RemoveHeader sets the removeHeader option to true to remove the authorization header before forwarding the request to your service. Default: false.
secret: Option<String>
Secret is the name of the referenced Kubernetes Secret containing user credentials.
Implementations§
Source§impl MiddlewareBasicAuth
impl MiddlewareBasicAuth
Sourcepub fn builder() -> MiddlewareBasicAuthBuilder<((), (), (), ())>
pub fn builder() -> MiddlewareBasicAuthBuilder<((), (), (), ())>
Create a builder for building MiddlewareBasicAuth
.
On the builder, call .header_field(...)
(optional), .realm(...)
(optional), .remove_header(...)
(optional), .secret(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of MiddlewareBasicAuth
.
Trait Implementations§
Source§impl Clone for MiddlewareBasicAuth
impl Clone for MiddlewareBasicAuth
Source§fn clone(&self) -> MiddlewareBasicAuth
fn clone(&self) -> MiddlewareBasicAuth
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for MiddlewareBasicAuth
impl Debug for MiddlewareBasicAuth
Source§impl Default for MiddlewareBasicAuth
impl Default for MiddlewareBasicAuth
Source§fn default() -> MiddlewareBasicAuth
fn default() -> MiddlewareBasicAuth
Source§impl<'de> Deserialize<'de> for MiddlewareBasicAuth
impl<'de> Deserialize<'de> for MiddlewareBasicAuth
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for MiddlewareBasicAuth
impl JsonSchema for MiddlewareBasicAuth
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref
keyword. Read moreSource§impl PartialEq for MiddlewareBasicAuth
impl PartialEq for MiddlewareBasicAuth
Source§impl Serialize for MiddlewareBasicAuth
impl Serialize for MiddlewareBasicAuth
impl StructuralPartialEq for MiddlewareBasicAuth
Auto Trait Implementations§
impl Freeze for MiddlewareBasicAuth
impl RefUnwindSafe for MiddlewareBasicAuth
impl Send for MiddlewareBasicAuth
impl Sync for MiddlewareBasicAuth
impl Unpin for MiddlewareBasicAuth
impl UnwindSafe for MiddlewareBasicAuth
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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