pub struct JwtAuthenticator { /* private fields */ }Expand description
JWT authenticator that verifies tokens against a JWKS endpoint.
Implementations§
Source§impl JwtAuthenticator
impl JwtAuthenticator
Sourcepub fn new(config: OidcConfig) -> Self
pub fn new(config: OidcConfig) -> Self
Create an authenticator using the default reqwest HTTP client.
Sourcepub fn with_http(config: OidcConfig, http: Arc<dyn HttpClient>) -> Self
pub fn with_http(config: OidcConfig, http: Arc<dyn HttpClient>) -> Self
Create an authenticator with an injected HTTP client.
Sourcepub fn verify(&self, token: &str) -> Result<VerifiedSubject, JwtAuthError>
pub fn verify(&self, token: &str) -> Result<VerifiedSubject, JwtAuthError>
Verify a bearer token and return its Typesec subject model.
Auto Trait Implementations§
impl !Freeze for JwtAuthenticator
impl !RefUnwindSafe for JwtAuthenticator
impl !UnwindSafe for JwtAuthenticator
impl Send for JwtAuthenticator
impl Sync for JwtAuthenticator
impl Unpin for JwtAuthenticator
impl UnsafeUnpin for JwtAuthenticator
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