pub struct TokenExchangeManager { /* private fields */ }Expand description
Token Exchange Manager
Implementations§
Source§impl TokenExchangeManager
impl TokenExchangeManager
Sourcepub fn new(jwt_validator: SecureJwtValidator) -> Self
pub fn new(jwt_validator: SecureJwtValidator) -> Self
Create a new token exchange manager
Sourcepub async fn register_policy(
&self,
client_id: String,
policy: TokenExchangePolicy,
)
pub async fn register_policy( &self, client_id: String, policy: TokenExchangePolicy, )
Register a token exchange policy for a client
Sourcepub async fn exchange_token(
&self,
request: TokenExchangeRequest,
client_id: &str,
) -> Result<TokenExchangeResponse>
pub async fn exchange_token( &self, request: TokenExchangeRequest, client_id: &str, ) -> Result<TokenExchangeResponse>
Process a token exchange request
Trait Implementations§
Source§impl TokenExchangeService for TokenExchangeManager
Implementation of the common TokenExchangeService trait
impl TokenExchangeService for TokenExchangeManager
Implementation of the common TokenExchangeService trait
Source§fn exchange_token<'life0, 'async_trait>(
&'life0 self,
request: Self::Request,
) -> Pin<Box<dyn Future<Output = Result<Self::Response>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn exchange_token<'life0, 'async_trait>(
&'life0 self,
request: Self::Request,
) -> Pin<Box<dyn Future<Output = Result<Self::Response>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Exchange a token following RFC 8693 (basic implementation)
Source§fn validate_token<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
token: &'life1 str,
token_type: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<TokenValidationResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn validate_token<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
token: &'life1 str,
token_type: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<TokenValidationResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Validate a token using the internal JWT validator
Source§fn supported_subject_token_types(&self) -> Vec<String>
fn supported_subject_token_types(&self) -> Vec<String>
Get supported subject token types
Source§fn supported_requested_token_types(&self) -> Vec<String>
fn supported_requested_token_types(&self) -> Vec<String>
Get supported requested token types
Source§fn capabilities(&self) -> TokenExchangeCapabilities
fn capabilities(&self) -> TokenExchangeCapabilities
Get service capabilities
Source§type Request = (TokenExchangeRequest, String)
type Request = (TokenExchangeRequest, String)
Exchange token request type
Source§type Response = TokenExchangeResponse
type Response = TokenExchangeResponse
Exchange token response type
Source§type Config = SecureJwtValidator
type Config = SecureJwtValidator
Configuration type
Auto Trait Implementations§
impl !Freeze for TokenExchangeManager
impl !RefUnwindSafe for TokenExchangeManager
impl Send for TokenExchangeManager
impl Sync for TokenExchangeManager
impl Unpin for TokenExchangeManager
impl !UnwindSafe for TokenExchangeManager
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