pub struct OidcValidator { /* private fields */ }
Expand description
OIDC JWT validator with JWKS caching
Implementations§
Source§impl OidcValidator
impl OidcValidator
Sourcepub fn new(config: OidcConfig) -> Self
pub fn new(config: OidcConfig) -> Self
Creates a new OidcValidator with the given configuration
pub async fn validate_custom<T>(
&self,
token: &str,
validation: &Validation,
) -> JwtResult<T>where
T: for<'de> Deserialize<'de>,
pub async fn validate<T>(&self, token: &str) -> JwtResult<T>where
T: for<'de> Deserialize<'de>,
Sourcepub async fn refresh_jwks_cache(&self) -> JwtResult<()>
pub async fn refresh_jwks_cache(&self) -> JwtResult<()>
Refreshes the JWKS cache by fetching the latest keys
Trait Implementations§
Source§impl Clone for OidcValidator
impl Clone for OidcValidator
Source§fn clone(&self) -> OidcValidator
fn clone(&self) -> OidcValidator
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 moreAuto Trait Implementations§
impl Freeze for OidcValidator
impl !RefUnwindSafe for OidcValidator
impl Send for OidcValidator
impl Sync for OidcValidator
impl Unpin for OidcValidator
impl !UnwindSafe for OidcValidator
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