Skip to main content

IdentityBackend

Trait IdentityBackend 

Source
pub trait IdentityBackend: Send + Sync {
Show 24 methods // Required methods fn add_user_to_group<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, user_id: &'a str, group_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<(), IdentityProviderError>> + Send + 'async_trait>> where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn add_user_to_group_expiring<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, user_id: &'a str, group_id: &'a str, idp_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<(), IdentityProviderError>> + Send + 'async_trait>> where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn add_users_to_groups<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, memberships: Vec<(&'a str, &'a str)>, ) -> Pin<Box<dyn Future<Output = Result<(), IdentityProviderError>> + Send + 'async_trait>> where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn add_users_to_groups_expiring<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, memberships: Vec<(&'a str, &'a str)>, idp_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<(), IdentityProviderError>> + Send + 'async_trait>> where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn authenticate_by_password<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, state: &'life1 ServiceState, auth: &'life2 UserPasswordAuthRequest, ) -> Pin<Box<dyn Future<Output = Result<AuthenticatedInfo, IdentityProviderError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn create_group<'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, group: GroupCreate, ) -> Pin<Box<dyn Future<Output = Result<Group, IdentityProviderError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn create_service_account<'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, sa: ServiceAccountCreate, ) -> Pin<Box<dyn Future<Output = Result<ServiceAccount, IdentityProviderError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn create_user<'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, user: UserCreate, ) -> Pin<Box<dyn Future<Output = Result<UserResponse, IdentityProviderError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn delete_group<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, group_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<(), IdentityProviderError>> + Send + 'async_trait>> where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn delete_user<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, user_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<(), IdentityProviderError>> + Send + 'async_trait>> where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_group<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, group_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<Option<Group>, IdentityProviderError>> + Send + 'async_trait>> where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_service_account<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, user_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<Option<ServiceAccount>, IdentityProviderError>> + Send + 'async_trait>> where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_user<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, user_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<Option<UserResponse>, IdentityProviderError>> + Send + 'async_trait>> where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_user_domain_id<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, user_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<String, IdentityProviderError>> + Send + 'async_trait>> where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn find_federated_user<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, idp_id: &'a str, unique_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<Option<UserResponse>, IdentityProviderError>> + Send + 'async_trait>> where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn list_groups<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, state: &'life1 ServiceState, params: &'life2 GroupListParameters, ) -> Pin<Box<dyn Future<Output = Result<Vec<Group>, IdentityProviderError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn list_users<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, state: &'life1 ServiceState, params: &'life2 UserListParameters, ) -> Pin<Box<dyn Future<Output = Result<Vec<UserResponse>, IdentityProviderError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn list_groups_of_user<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, user_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<Vec<Group>, IdentityProviderError>> + Send + 'async_trait>> where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn remove_user_from_group<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, user_id: &'a str, group_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<(), IdentityProviderError>> + Send + 'async_trait>> where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn remove_user_from_group_expiring<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, user_id: &'a str, group_id: &'a str, idp_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<(), IdentityProviderError>> + Send + 'async_trait>> where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn remove_user_from_groups<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, user_id: &'a str, group_ids: HashSet<&'a str>, ) -> Pin<Box<dyn Future<Output = Result<(), IdentityProviderError>> + Send + 'async_trait>> where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn remove_user_from_groups_expiring<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, user_id: &'a str, group_ids: HashSet<&'a str>, idp_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<(), IdentityProviderError>> + Send + 'async_trait>> where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn set_user_groups<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, user_id: &'a str, group_ids: HashSet<&'a str>, ) -> Pin<Box<dyn Future<Output = Result<(), IdentityProviderError>> + Send + 'async_trait>> where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn set_user_groups_expiring<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, user_id: &'a str, group_ids: HashSet<&'a str>, idp_id: &'a str, last_verified: Option<&'a DateTime<Utc>>, ) -> Pin<Box<dyn Future<Output = Result<(), IdentityProviderError>> + Send + 'async_trait>> where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait;
}

Required Methods§

Source

fn add_user_to_group<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, user_id: &'a str, group_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<(), IdentityProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Add the user to the group.

Source

fn add_user_to_group_expiring<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, user_id: &'a str, group_id: &'a str, idp_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<(), IdentityProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Add the user to the group with expiration.

Source

fn add_users_to_groups<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, memberships: Vec<(&'a str, &'a str)>, ) -> Pin<Box<dyn Future<Output = Result<(), IdentityProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Add user group membership relations.

Source

fn add_users_to_groups_expiring<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, memberships: Vec<(&'a str, &'a str)>, idp_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<(), IdentityProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Add expiring user group membership relations.

Source

fn authenticate_by_password<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, state: &'life1 ServiceState, auth: &'life2 UserPasswordAuthRequest, ) -> Pin<Box<dyn Future<Output = Result<AuthenticatedInfo, IdentityProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Authenticate a user by a password.

Source

fn create_group<'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, group: GroupCreate, ) -> Pin<Box<dyn Future<Output = Result<Group, IdentityProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Create group.

Source

fn create_service_account<'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, sa: ServiceAccountCreate, ) -> Pin<Box<dyn Future<Output = Result<ServiceAccount, IdentityProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Create service account.

Source

fn create_user<'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, user: UserCreate, ) -> Pin<Box<dyn Future<Output = Result<UserResponse, IdentityProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Create user.

Source

fn delete_group<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, group_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<(), IdentityProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Delete group by ID.

Source

fn delete_user<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, user_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<(), IdentityProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Delete user.

Source

fn get_group<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, group_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<Option<Group>, IdentityProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get single group by ID.

Source

fn get_service_account<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, user_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<Option<ServiceAccount>, IdentityProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get single service account by ID.

Source

fn get_user<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, user_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<Option<UserResponse>, IdentityProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get single user by ID.

Source

fn get_user_domain_id<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, user_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<String, IdentityProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get single user by ID.

Source

fn find_federated_user<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, idp_id: &'a str, unique_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<Option<UserResponse>, IdentityProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Find federated user by IDP and Unique ID.

Source

fn list_groups<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, state: &'life1 ServiceState, params: &'life2 GroupListParameters, ) -> Pin<Box<dyn Future<Output = Result<Vec<Group>, IdentityProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

List groups.

Source

fn list_users<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, state: &'life1 ServiceState, params: &'life2 UserListParameters, ) -> Pin<Box<dyn Future<Output = Result<Vec<UserResponse>, IdentityProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

List Users.

Source

fn list_groups_of_user<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, user_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<Vec<Group>, IdentityProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

List groups a user is member of.

Source

fn remove_user_from_group<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, user_id: &'a str, group_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<(), IdentityProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Remove the user from the group.

Source

fn remove_user_from_group_expiring<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, user_id: &'a str, group_id: &'a str, idp_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<(), IdentityProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Remove the user from the group with expiration.

Source

fn remove_user_from_groups<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, user_id: &'a str, group_ids: HashSet<&'a str>, ) -> Pin<Box<dyn Future<Output = Result<(), IdentityProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Remove the user from multiple groups.

Source

fn remove_user_from_groups_expiring<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, user_id: &'a str, group_ids: HashSet<&'a str>, idp_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<(), IdentityProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Remove the user from multiple expiring groups.

Source

fn set_user_groups<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, user_id: &'a str, group_ids: HashSet<&'a str>, ) -> Pin<Box<dyn Future<Output = Result<(), IdentityProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Set group memberships for the user.

Source

fn set_user_groups_expiring<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, user_id: &'a str, group_ids: HashSet<&'a str>, idp_id: &'a str, last_verified: Option<&'a DateTime<Utc>>, ) -> Pin<Box<dyn Future<Output = Result<(), IdentityProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Set expiring group memberships for the user.

Implementors§