pub struct DefaultJwtAuthorizerBuilder<Be, P> { /* private fields */ }Expand description
A very interesting design choice.
§Usage
With this builder you are able to create a DefaultJwtAuthorizer like this
ⓘ
let jwt_authorizer = DefaultJwtAuthorizerBuilder::new(
bearer_extractor,
jwk_set_provider,
validation,
)
.build::<Claims>();instead of this
ⓘ
let jwt_authorizer =
DefaultJwtAuthorizer::<_, _, Claims>::new(bearer_extractor, jwk_set_provider, validation);Implementations§
Source§impl<Be, P> DefaultJwtAuthorizerBuilder<Be, P>
impl<Be, P> DefaultJwtAuthorizerBuilder<Be, P>
pub fn new( bearer_extractor: Be, jwk_set_provider: P, validation: Validation, ) -> Self
pub fn build<C>(self) -> DefaultJwtAuthorizer<Be, P, C>
Trait Implementations§
Auto Trait Implementations§
impl<Be, P> Freeze for DefaultJwtAuthorizerBuilder<Be, P>
impl<Be, P> RefUnwindSafe for DefaultJwtAuthorizerBuilder<Be, P>where
Be: RefUnwindSafe,
P: RefUnwindSafe,
impl<Be, P> Send for DefaultJwtAuthorizerBuilder<Be, P>
impl<Be, P> Sync for DefaultJwtAuthorizerBuilder<Be, P>
impl<Be, P> Unpin for DefaultJwtAuthorizerBuilder<Be, P>
impl<Be, P> UnwindSafe for DefaultJwtAuthorizerBuilder<Be, P>where
Be: UnwindSafe,
P: UnwindSafe,
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