#[non_exhaustive]pub struct JwtLocation {
pub value_prefix: String,
pub in: Option<In>,
/* private fields */
}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
pub fn new() -> Self
Sourcepub fn set_value_prefix<T: Into<String>>(self, v: T) -> Self
pub fn set_value_prefix<T: Into<String>>(self, v: T) -> Self
Sourcepub fn header(&self) -> Option<&String>
pub fn 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 set_header<T: Into<String>>(self, v: T) -> Self
pub fn set_header<T: Into<String>>(self, v: T) -> Self
Sourcepub fn query(&self) -> Option<&String>
pub fn 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.
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