pub struct DefaultClaimsExtractor { /* private fields */ }Expand description
Default claims extractor that maps standard claims to User.
Implementations§
Source§impl DefaultClaimsExtractor
impl DefaultClaimsExtractor
Sourcepub fn new() -> DefaultClaimsExtractor
pub fn new() -> DefaultClaimsExtractor
Create a new default claims extractor.
Sourcepub fn username_claim(self, claim: &str) -> DefaultClaimsExtractor
pub fn username_claim(self, claim: &str) -> DefaultClaimsExtractor
Set custom username claim name.
Sourcepub fn roles_claim(self, claim: &str) -> DefaultClaimsExtractor
pub fn roles_claim(self, claim: &str) -> DefaultClaimsExtractor
Set custom roles claim name.
Set custom authorities claim name.
Trait Implementations§
Source§impl Clone for DefaultClaimsExtractor
impl Clone for DefaultClaimsExtractor
Source§fn clone(&self) -> DefaultClaimsExtractor
fn clone(&self) -> DefaultClaimsExtractor
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for DefaultClaimsExtractor
impl Default for DefaultClaimsExtractor
Source§fn default() -> DefaultClaimsExtractor
fn default() -> DefaultClaimsExtractor
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DefaultClaimsExtractor
impl RefUnwindSafe for DefaultClaimsExtractor
impl Send for DefaultClaimsExtractor
impl Sync for DefaultClaimsExtractor
impl Unpin for DefaultClaimsExtractor
impl UnwindSafe for DefaultClaimsExtractor
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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