pub struct OidcDecoder { /* private fields */ }Expand description
ConstDecoder will decode token with a static secret.
Implementations§
Source§impl OidcDecoder
impl OidcDecoder
Sourcepub fn new(
issuer: impl AsRef<str>,
) -> impl Future<Output = Result<OidcDecoder, JwtAuthError>>
pub fn new( issuer: impl AsRef<str>, ) -> impl Future<Output = Result<OidcDecoder, JwtAuthError>>
Create a new OidcDecoder.
Sourcepub fn builder<T>(issuer: T) -> DecoderBuilder<T>
pub fn builder<T>(issuer: T) -> DecoderBuilder<T>
Create a new DecoderBuilder.
Trait Implementations§
Source§impl Clone for OidcDecoder
impl Clone for OidcDecoder
Source§fn clone(&self) -> OidcDecoder
fn clone(&self) -> OidcDecoder
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 Debug for OidcDecoder
impl Debug for OidcDecoder
Source§impl JwtAuthDecoder for OidcDecoder
impl JwtAuthDecoder for OidcDecoder
Source§async fn decode<C>(
&self,
token: &str,
_depot: &mut Depot,
) -> Result<TokenData<C>, <OidcDecoder as JwtAuthDecoder>::Error>where
C: DeserializeOwned,
async fn decode<C>(
&self,
token: &str,
_depot: &mut Depot,
) -> Result<TokenData<C>, <OidcDecoder as JwtAuthDecoder>::Error>where
C: DeserializeOwned,
Validates a JWT, Returning the claims serialized into type of T
Source§type Error = JwtAuthError
type Error = JwtAuthError
The error type returned if decoding or validation fails.
Auto Trait Implementations§
impl Freeze for OidcDecoder
impl !RefUnwindSafe for OidcDecoder
impl Send for OidcDecoder
impl Sync for OidcDecoder
impl Unpin for OidcDecoder
impl !UnwindSafe for OidcDecoder
Blanket Implementations§
Source§impl<Data> ApiSuccessResponse for Data
impl<Data> ApiSuccessResponse for Data
fn api_response<Meta>(self, meta: Option<Meta>) -> ApiResponse<Self, Meta>
fn api_response_without_meta<Meta>(self) -> ApiResponse<Self, Meta>
fn api_response_with_meta<Meta>(self, meta: Meta) -> ApiResponse<Self, Meta>
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> FutureTraceExt for Twhere
T: FutureExt,
impl<T> FutureTraceExt for Twhere
T: FutureExt,
Source§fn with_current_context_span(self, otel_span: Span) -> WithContext<Self> ⓘ
fn with_current_context_span(self, otel_span: Span) -> WithContext<Self> ⓘ
Pass the span of opentelemetry to the current context of tracing.
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::Request