#[non_exhaustive]pub struct JwtLocation {
    pub value_prefix: String,
    pub in: Option<In>,
}Expand description
Specifies a location to extract JWT from an API request.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.value_prefix: StringThe value prefix. The value format is “value_prefix{token}” Only applies to “in” header type. Must be empty for “in” query type. If not empty, the header value has to match (case sensitive) this prefix. If not matched, JWT will not be extracted. If matched, JWT will be extracted after the prefix is removed.
For example, for “Authorization: Bearer {JWT}”, value_prefix=“Bearer “ with a space at the end.
in: Option<In>Implementations§
Source§impl JwtLocation
 
impl JwtLocation
Sourcepub fn set_value_prefix<T: Into<String>>(self, v: T) -> Self
 
pub fn set_value_prefix<T: Into<String>>(self, v: T) -> Self
Sets the value of value_prefix.
Sourcepub fn get_header(&self) -> Option<&String>
 
pub fn get_header(&self) -> Option<&String>
The value of [r#in][crate::model::JwtLocation::r#in]
if it holds a Header, None if the field is not set or
holds a different branch.
Sourcepub fn get_query(&self) -> Option<&String>
 
pub fn get_query(&self) -> Option<&String>
The value of [r#in][crate::model::JwtLocation::r#in]
if it holds a Query, None if the field is not set or
holds a different branch.
The value of [r#in][crate::model::JwtLocation::r#in]
if it holds a Cookie, None if the field is not set or
holds a different branch.
Sourcepub fn set_header<T: Into<String>>(self, v: T) -> Self
 
pub fn set_header<T: Into<String>>(self, v: T) -> Self
Sets the value of [r#in][crate::model::JwtLocation::r#in]
to hold a Header.
Note that all the setters affecting r#in are
mutually exclusive.
Sourcepub fn set_query<T: Into<String>>(self, v: T) -> Self
 
pub fn set_query<T: Into<String>>(self, v: T) -> Self
Sets the value of [r#in][crate::model::JwtLocation::r#in]
to hold a Query.
Note that all the setters affecting r#in are
mutually exclusive.
Sets the value of [r#in][crate::model::JwtLocation::r#in]
to hold a Cookie.
Note that all the setters affecting r#in are
mutually exclusive.
Trait Implementations§
Source§impl Clone for JwtLocation
 
impl Clone for JwtLocation
Source§fn clone(&self) -> JwtLocation
 
fn clone(&self) -> JwtLocation
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
source. Read more