pub struct MiddlewareForwardAuth {
pub add_auth_cookies_to_response: Option<Vec<String>>,
pub address: Option<String>,
pub auth_request_headers: Option<Vec<String>>,
pub auth_response_headers: Option<Vec<String>>,
pub auth_response_headers_regex: Option<String>,
pub forward_body: Option<bool>,
pub max_body_size: Option<i64>,
pub preserve_location_header: Option<bool>,
pub tls: Option<MiddlewareForwardAuthTls>,
pub trust_forward_header: Option<bool>,
}
Expand description
ForwardAuth holds the forward auth middleware configuration. This middleware delegates the request authentication to a Service. More info: https://doc.traefik.io/traefik/v3.3/middlewares/http/forwardauth/
Fields§
AddAuthCookiesToResponse defines the list of cookies to copy from the authentication server response to the response.
address: Option<String>
Address defines the authentication server address.
auth_request_headers: Option<Vec<String>>
AuthRequestHeaders defines the list of the headers to copy from the request to the authentication server. If not set or empty then all request headers are passed.
auth_response_headers: Option<Vec<String>>
AuthResponseHeaders defines the list of headers to copy from the authentication server response and set on forwarded request, replacing any existing conflicting headers.
auth_response_headers_regex: Option<String>
AuthResponseHeadersRegex defines the regex to match headers to copy from the authentication server response and set on forwarded request, after stripping all headers that match the regex. More info: https://doc.traefik.io/traefik/v3.3/middlewares/http/forwardauth/#authresponseheadersregex
forward_body: Option<bool>
ForwardBody defines whether to send the request body to the authentication server.
max_body_size: Option<i64>
MaxBodySize defines the maximum body size in bytes allowed to be forwarded to the authentication server.
preserve_location_header: Option<bool>
PreserveLocationHeader defines whether to forward the Location header to the client as is or prefix it with the domain name of the authentication server.
tls: Option<MiddlewareForwardAuthTls>
TLS defines the configuration used to secure the connection to the authentication server.
trust_forward_header: Option<bool>
TrustForwardHeader defines whether to trust (ie: forward) all X-Forwarded-* headers.
Implementations§
Source§impl MiddlewareForwardAuth
impl MiddlewareForwardAuth
Sourcepub fn builder() -> MiddlewareForwardAuthBuilder<((), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> MiddlewareForwardAuthBuilder<((), (), (), (), (), (), (), (), (), ())>
Create a builder for building MiddlewareForwardAuth
.
On the builder, call .add_auth_cookies_to_response(...)
(optional), .address(...)
(optional), .auth_request_headers(...)
(optional), .auth_response_headers(...)
(optional), .auth_response_headers_regex(...)
(optional), .forward_body(...)
(optional), .max_body_size(...)
(optional), .preserve_location_header(...)
(optional), .tls(...)
(optional), .trust_forward_header(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of MiddlewareForwardAuth
.
Trait Implementations§
Source§impl Clone for MiddlewareForwardAuth
impl Clone for MiddlewareForwardAuth
Source§fn clone(&self) -> MiddlewareForwardAuth
fn clone(&self) -> MiddlewareForwardAuth
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for MiddlewareForwardAuth
impl Debug for MiddlewareForwardAuth
Source§impl Default for MiddlewareForwardAuth
impl Default for MiddlewareForwardAuth
Source§fn default() -> MiddlewareForwardAuth
fn default() -> MiddlewareForwardAuth
Source§impl<'de> Deserialize<'de> for MiddlewareForwardAuth
impl<'de> Deserialize<'de> for MiddlewareForwardAuth
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 MiddlewareForwardAuth
impl JsonSchema for MiddlewareForwardAuth
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 MiddlewareForwardAuth
impl PartialEq for MiddlewareForwardAuth
Source§impl Serialize for MiddlewareForwardAuth
impl Serialize for MiddlewareForwardAuth
impl StructuralPartialEq for MiddlewareForwardAuth
Auto Trait Implementations§
impl Freeze for MiddlewareForwardAuth
impl RefUnwindSafe for MiddlewareForwardAuth
impl Send for MiddlewareForwardAuth
impl Sync for MiddlewareForwardAuth
impl Unpin for MiddlewareForwardAuth
impl UnwindSafe for MiddlewareForwardAuth
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