pub trait TokenExchangeService: Send + Sync {
type Request: Send + Sync;
type Response: Send + Sync;
type Config: Send + Sync;
// Required methods
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 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 supported_subject_token_types(&self) -> Vec<String>;
fn supported_requested_token_types(&self) -> Vec<String>;
fn capabilities(&self) -> TokenExchangeCapabilities;
}Expand description
Common token exchange service trait implemented by both managers
Required Associated Types§
Required Methods§
Sourcefn 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 according to RFC 8693
Sourcefn 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 of the specified type
Sourcefn supported_subject_token_types(&self) -> Vec<String>
fn supported_subject_token_types(&self) -> Vec<String>
Get supported subject token types
Sourcefn supported_requested_token_types(&self) -> Vec<String>
fn supported_requested_token_types(&self) -> Vec<String>
Get supported requested token types
Sourcefn capabilities(&self) -> TokenExchangeCapabilities
fn capabilities(&self) -> TokenExchangeCapabilities
Get service capabilities
Implementors§
Source§impl TokenExchangeService for AdvancedTokenExchangeManager
Implementation of the common TokenExchangeService trait
impl TokenExchangeService for AdvancedTokenExchangeManager
Implementation of the common TokenExchangeService trait
Source§impl TokenExchangeService for TokenExchangeManager
Implementation of the common TokenExchangeService trait
impl TokenExchangeService for TokenExchangeManager
Implementation of the common TokenExchangeService trait