pub struct OidcVerifier { /* private fields */ }Expand description
Verifies bearer tokens against an OIDC issuer’s published keys.
Implementations§
Source§impl OidcVerifier
impl OidcVerifier
Sourcepub async fn discover(settings: OidcSettings) -> Result<Self>
pub async fn discover(settings: OidcSettings) -> Result<Self>
Discover the issuer and fetch its keys.
Runs at startup and fails fast (D39): a verifier that cannot reach its issuer would refuse every identity token, which is a misconfiguration better reported before the listener binds than after.
§Errors
When the discovery document or the JWKS cannot be fetched or parsed, or
when the document’s issuer is not the configured one.
Sourcepub fn settings(&self) -> &OidcSettings
pub fn settings(&self) -> &OidcSettings
The settings this verifier was built from.
Trait Implementations§
Source§impl Debug for OidcVerifier
impl Debug for OidcVerifier
Source§impl TokenVerifier for OidcVerifier
impl TokenVerifier for OidcVerifier
Auto Trait Implementations§
impl !Freeze for OidcVerifier
impl !RefUnwindSafe for OidcVerifier
impl !UnwindSafe for OidcVerifier
impl Send for OidcVerifier
impl Sync for OidcVerifier
impl Unpin for OidcVerifier
impl UnsafeUnpin for OidcVerifier
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestCreates a shared type from an unshared type.