pub struct JwtIntrospectionManager { /* private fields */ }Expand description
JWT Token Introspection Manager
Implementations§
Source§impl JwtIntrospectionManager
impl JwtIntrospectionManager
Sourcepub fn new(config: JwtIntrospectionConfig) -> Result<Self>
pub fn new(config: JwtIntrospectionConfig) -> Result<Self>
Create a new JWT introspection manager
Sourcepub fn create_jwt_response(
&self,
basic_response: BasicIntrospectionResponse,
audience: Option<Vec<String>>,
token_jti: Option<String>,
) -> Result<String>
pub fn create_jwt_response( &self, basic_response: BasicIntrospectionResponse, audience: Option<Vec<String>>, token_jti: Option<String>, ) -> Result<String>
Create a JWT introspection response from basic introspection data
Sourcepub fn verify_jwt_response(
&self,
jwt_token: &str,
) -> Result<JwtIntrospectionClaims>
pub fn verify_jwt_response( &self, jwt_token: &str, ) -> Result<JwtIntrospectionClaims>
Verify and parse a JWT introspection response
Sourcepub fn create_inactive_response(
&self,
audience: Option<Vec<String>>,
token_jti: Option<String>,
) -> Result<String>
pub fn create_inactive_response( &self, audience: Option<Vec<String>>, token_jti: Option<String>, ) -> Result<String>
Create an inactive token response (for expired or invalid tokens)
Sourcepub fn jwt_to_basic_response(
&self,
claims: &JwtIntrospectionClaims,
) -> BasicIntrospectionResponse
pub fn jwt_to_basic_response( &self, claims: &JwtIntrospectionClaims, ) -> BasicIntrospectionResponse
Convert JWT introspection claims back to basic response format
Sourcepub fn validate_request_audience(&self, requested_audience: &[String]) -> bool
pub fn validate_request_audience(&self, requested_audience: &[String]) -> bool
Validate introspection request audience
Sourcepub fn get_issuer(&self) -> &str
pub fn get_issuer(&self) -> &str
Get the issuer for introspection responses
Sourcepub fn get_default_audience(&self) -> &[String]
pub fn get_default_audience(&self) -> &[String]
Get the default audience
Sourcepub fn create_error_response(
&self,
error: &str,
error_description: Option<&str>,
) -> Value
pub fn create_error_response( &self, error: &str, error_description: Option<&str>, ) -> Value
Create an error response for invalid requests
Sourcepub fn create_introspection_metadata(&self) -> Value
pub fn create_introspection_metadata(&self) -> Value
Create introspection metadata for discovery
Auto Trait Implementations§
impl Freeze for JwtIntrospectionManager
impl RefUnwindSafe for JwtIntrospectionManager
impl Send for JwtIntrospectionManager
impl Sync for JwtIntrospectionManager
impl Unpin for JwtIntrospectionManager
impl UnwindSafe for JwtIntrospectionManager
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> 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 more