pub trait TokenRestrictionBackend: Send + Sync {
// Required methods
fn get_token_restriction<'a, 'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 ServiceState,
id: &'a str,
expand_roles: bool,
) -> Pin<Box<dyn Future<Output = Result<Option<TokenRestriction>, TokenProviderError>> + Send + 'async_trait>>
where Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn create_token_restriction<'a, 'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 ServiceState,
restriction: TokenRestrictionCreate,
) -> Pin<Box<dyn Future<Output = Result<TokenRestriction, TokenProviderError>> + Send + 'async_trait>>
where Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_token_restrictions<'a, 'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
state: &'life1 ServiceState,
params: &'life2 TokenRestrictionListParameters,
) -> Pin<Box<dyn Future<Output = Result<Vec<TokenRestriction>, TokenProviderError>> + Send + 'async_trait>>
where Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn update_token_restriction<'a, 'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 ServiceState,
id: &'a str,
restriction: TokenRestrictionUpdate,
) -> Pin<Box<dyn Future<Output = Result<TokenRestriction, TokenProviderError>> + Send + 'async_trait>>
where Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete_token_restriction<'a, 'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 ServiceState,
id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<(), TokenProviderError>> + Send + 'async_trait>>
where Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Token restrictions backend interface.
Required Methods§
Sourcefn get_token_restriction<'a, 'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 ServiceState,
id: &'a str,
expand_roles: bool,
) -> Pin<Box<dyn Future<Output = Result<Option<TokenRestriction>, TokenProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_token_restriction<'a, 'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 ServiceState,
id: &'a str,
expand_roles: bool,
) -> Pin<Box<dyn Future<Output = Result<Option<TokenRestriction>, TokenProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get the token restriction by the ID.
Sourcefn create_token_restriction<'a, 'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 ServiceState,
restriction: TokenRestrictionCreate,
) -> Pin<Box<dyn Future<Output = Result<TokenRestriction, TokenProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_token_restriction<'a, 'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 ServiceState,
restriction: TokenRestrictionCreate,
) -> Pin<Box<dyn Future<Output = Result<TokenRestriction, TokenProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create new token restriction.
Sourcefn list_token_restrictions<'a, 'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
state: &'life1 ServiceState,
params: &'life2 TokenRestrictionListParameters,
) -> Pin<Box<dyn Future<Output = Result<Vec<TokenRestriction>, TokenProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn list_token_restrictions<'a, 'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
state: &'life1 ServiceState,
params: &'life2 TokenRestrictionListParameters,
) -> Pin<Box<dyn Future<Output = Result<Vec<TokenRestriction>, TokenProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
List token restrictions.
Sourcefn update_token_restriction<'a, 'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 ServiceState,
id: &'a str,
restriction: TokenRestrictionUpdate,
) -> Pin<Box<dyn Future<Output = Result<TokenRestriction, TokenProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_token_restriction<'a, 'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 ServiceState,
id: &'a str,
restriction: TokenRestrictionUpdate,
) -> Pin<Box<dyn Future<Output = Result<TokenRestriction, TokenProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Update token restriction by the ID.
Sourcefn delete_token_restriction<'a, 'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 ServiceState,
id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<(), TokenProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_token_restriction<'a, 'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 ServiceState,
id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<(), TokenProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete token restriction by the ID.