Struct kanidm_client::KanidmClient
source · pub struct KanidmClient { /* private fields */ }
Implementations§
source§impl KanidmClient
impl KanidmClient
pub async fn idm_person_account_list(&self) -> Result<Vec<Entry>, ClientError>
pub async fn idm_person_account_get( &self, id: &str ) -> Result<Option<Entry>, ClientError>
pub async fn idm_person_account_create( &self, name: &str, displayname: &str ) -> Result<(), ClientError>
pub async fn idm_person_account_update( &self, id: &str, newname: Option<&str>, displayname: Option<&str>, legalname: Option<&str>, mail: Option<&[String]> ) -> Result<(), ClientError>
pub async fn idm_person_account_delete( &self, id: &str ) -> Result<(), ClientError>
pub async fn idm_person_account_add_attr( &self, id: &str, attr: &str, values: &[&str] ) -> Result<(), ClientError>
pub async fn idm_person_account_set_attr( &self, id: &str, attr: &str, values: &[&str] ) -> Result<(), ClientError>
pub async fn idm_person_account_get_attr( &self, id: &str, attr: &str ) -> Result<Option<Vec<String>>, ClientError>
pub async fn idm_person_account_purge_attr( &self, id: &str, attr: &str ) -> Result<(), ClientError>
pub async fn idm_person_account_primary_credential_import_password( &self, id: &str, pw: &str ) -> Result<(), ClientError>
pub async fn idm_person_account_get_credential_status( &self, id: &str ) -> Result<CredentialStatus, ClientError>
pub async fn idm_person_account_primary_credential_set_password( &self, id: &str, pw: &str ) -> Result<(), ClientError>
pub async fn idm_person_account_post_ssh_pubkey( &self, id: &str, tag: &str, pubkey: &str ) -> Result<(), ClientError>
pub async fn idm_person_account_delete_ssh_pubkey( &self, id: &str, tag: &str ) -> Result<(), ClientError>
pub async fn idm_person_account_unix_extend( &self, id: &str, gidnumber: Option<u32>, shell: Option<&str> ) -> Result<(), ClientError>
pub async fn idm_person_account_unix_cred_put( &self, id: &str, cred: &str ) -> Result<(), ClientError>
pub async fn idm_person_account_unix_cred_delete( &self, id: &str ) -> Result<(), ClientError>
pub async fn idm_account_radius_credential_get( &self, id: &str ) -> Result<Option<String>, ClientError>
pub async fn idm_account_radius_credential_regenerate( &self, id: &str ) -> Result<String, ClientError>
pub async fn idm_account_radius_credential_delete( &self, id: &str ) -> Result<(), ClientError>
pub async fn idm_account_list_user_auth_token( &self, id: &str ) -> Result<Vec<UatStatus>, ClientError>
pub async fn idm_account_destroy_user_auth_token( &self, id: &str, token_id: Uuid ) -> Result<(), ClientError>
source§impl KanidmClient
impl KanidmClient
pub async fn scim_v1_sync_status(&self) -> Result<ScimSyncState, ClientError>
pub async fn scim_v1_sync_update( &self, scim_sync_request: &ScimSyncRequest ) -> Result<(), ClientError>
source§impl KanidmClient
impl KanidmClient
pub async fn idm_service_account_list(&self) -> Result<Vec<Entry>, ClientError>
pub async fn idm_service_account_get( &self, id: &str ) -> Result<Option<Entry>, ClientError>
sourcepub async fn idm_service_account_create(
&self,
name: &str,
displayname: &str
) -> Result<(), ClientError>
pub async fn idm_service_account_create( &self, name: &str, displayname: &str ) -> Result<(), ClientError>
Handles creating a service account
pub async fn idm_service_account_delete( &self, id: &str ) -> Result<(), ClientError>
pub async fn idm_service_account_update( &self, id: &str, newname: Option<&str>, displayname: Option<&str>, mail: Option<&[String]> ) -> Result<(), ClientError>
pub async fn idm_service_account_add_attr( &self, id: &str, attr: &str, values: &[&str] ) -> Result<(), ClientError>
pub async fn idm_service_account_set_attr( &self, id: &str, attr: &str, values: &[&str] ) -> Result<(), ClientError>
pub async fn idm_service_account_get_attr( &self, id: &str, attr: &str ) -> Result<Option<Vec<String>>, ClientError>
pub async fn idm_service_account_purge_attr( &self, id: &str, attr: &str ) -> Result<(), ClientError>
pub async fn idm_service_account_post_ssh_pubkey( &self, id: &str, tag: &str, pubkey: &str ) -> Result<(), ClientError>
pub async fn idm_service_account_delete_ssh_pubkey( &self, id: &str, tag: &str ) -> Result<(), ClientError>
pub async fn idm_service_account_unix_extend( &self, id: &str, gidnumber: Option<u32>, shell: Option<&str> ) -> Result<(), ClientError>
pub async fn idm_service_account_into_person( &self, id: &str ) -> Result<(), ClientError>
pub async fn idm_service_account_get_credential_status( &self, id: &str ) -> Result<CredentialStatus, ClientError>
pub async fn idm_service_account_generate_password( &self, id: &str ) -> Result<String, ClientError>
pub async fn idm_service_account_list_api_token( &self, id: &str ) -> Result<Vec<ApiToken>, ClientError>
pub async fn idm_service_account_generate_api_token( &self, id: &str, label: &str, expiry: Option<OffsetDateTime>, read_write: bool ) -> Result<String, ClientError>
pub async fn idm_service_account_destroy_api_token( &self, id: &str, token_id: Uuid ) -> Result<(), ClientError>
source§impl KanidmClient
impl KanidmClient
pub async fn idm_sync_account_list(&self) -> Result<Vec<Entry>, ClientError>
pub async fn idm_sync_account_get( &self, id: &str ) -> Result<Option<Entry>, ClientError>
pub async fn idm_sync_account_create( &self, name: &str, description: Option<&str> ) -> Result<(), ClientError>
pub async fn idm_sync_account_generate_token( &self, id: &str, label: &str ) -> Result<String, ClientError>
pub async fn idm_sync_account_destroy_token( &self, id: &str ) -> Result<(), ClientError>
pub async fn idm_sync_account_force_refresh( &self, id: &str ) -> Result<(), ClientError>
pub async fn idm_sync_account_finalise( &self, id: &str ) -> Result<(), ClientError>
pub async fn idm_sync_account_terminate( &self, id: &str ) -> Result<(), ClientError>
source§impl KanidmClient
impl KanidmClient
pub async fn system_password_badlist_get( &self ) -> Result<Vec<String>, ClientError>
pub async fn system_password_badlist_append( &self, list: Vec<String> ) -> Result<(), ClientError>
pub async fn system_password_badlist_remove( &self, list: Vec<String> ) -> Result<(), ClientError>
source§impl KanidmClient
impl KanidmClient
pub fn get_origin(&self) -> &Url
pub fn get_url(&self) -> &str
pub async fn set_token(&self, new_token: String)
pub async fn get_token(&self) -> Option<String>
pub fn new_session(&self) -> Result<Self, Error>
pub async fn logout(&self) -> Result<(), ClientError>
pub async fn auth_step_init( &self, ident: &str ) -> Result<Set<AuthMech>, ClientError>
pub async fn auth_step_begin( &self, mech: AuthMech ) -> Result<Vec<AuthAllowed>, ClientError>
pub async fn auth_step_anonymous(&self) -> Result<AuthResponse, ClientError>
pub async fn auth_step_password( &self, password: &str ) -> Result<AuthResponse, ClientError>
pub async fn auth_step_backup_code( &self, backup_code: &str ) -> Result<AuthResponse, ClientError>
pub async fn auth_step_totp( &self, totp: u32 ) -> Result<AuthResponse, ClientError>
pub async fn auth_step_securitykey_complete( &self, pkc: Box<PublicKeyCredential> ) -> Result<AuthResponse, ClientError>
pub async fn auth_step_passkey_complete( &self, pkc: Box<PublicKeyCredential> ) -> Result<AuthResponse, ClientError>
pub async fn auth_anonymous(&self) -> Result<(), ClientError>
pub async fn auth_simple_password( &self, ident: &str, password: &str ) -> Result<(), ClientError>
pub async fn auth_password_totp( &self, ident: &str, password: &str, totp: u32 ) -> Result<(), ClientError>
pub async fn auth_password_backup_code( &self, ident: &str, password: &str, backup_code: &str ) -> Result<(), ClientError>
pub async fn auth_passkey_begin( &self, ident: &str ) -> Result<RequestChallengeResponse, ClientError>
pub async fn auth_passkey_complete( &self, pkc: Box<PublicKeyCredential> ) -> Result<(), ClientError>
pub async fn reauth_begin(&self) -> Result<Vec<AuthAllowed>, ClientError>
pub async fn reauth_simple_password( &self, password: &str ) -> Result<(), ClientError>
pub async fn reauth_password_totp( &self, password: &str, totp: u32 ) -> Result<(), ClientError>
pub async fn reauth_passkey_begin( &self ) -> Result<RequestChallengeResponse, ClientError>
pub async fn reauth_passkey_complete( &self, pkc: Box<PublicKeyCredential> ) -> Result<(), ClientError>
pub async fn auth_valid(&self) -> Result<(), ClientError>
pub async fn whoami(&self) -> Result<Option<Entry>, ClientError>
pub async fn search(&self, filter: Filter) -> Result<Vec<Entry>, ClientError>
pub async fn create(&self, entries: Vec<Entry>) -> Result<(), ClientError>
pub async fn modify( &self, filter: Filter, modlist: ModifyList ) -> Result<(), ClientError>
pub async fn delete(&self, filter: Filter) -> Result<(), ClientError>
pub async fn idm_group_list(&self) -> Result<Vec<Entry>, ClientError>
pub async fn idm_group_get(&self, id: &str) -> Result<Option<Entry>, ClientError>
pub async fn idm_group_get_members( &self, id: &str ) -> Result<Option<Vec<String>>, ClientError>
pub async fn idm_group_create(&self, name: &str) -> Result<(), ClientError>
pub async fn idm_group_set_members( &self, id: &str, members: &[&str] ) -> Result<(), ClientError>
pub async fn idm_group_add_members( &self, id: &str, members: &[&str] ) -> Result<(), ClientError>
pub async fn idm_group_remove_members( &self, group: &str, members: &[&str] ) -> Result<(), ClientError>
pub async fn idm_group_purge_members(&self, id: &str) -> Result<(), ClientError>
pub async fn idm_group_unix_extend( &self, id: &str, gidnumber: Option<u32> ) -> Result<(), ClientError>
pub async fn idm_group_unix_token_get( &self, id: &str ) -> Result<UnixGroupToken, ClientError>
pub async fn idm_group_delete(&self, id: &str) -> Result<(), ClientError>
pub async fn idm_account_unix_token_get( &self, id: &str ) -> Result<UnixUserToken, ClientError>
pub async fn idm_person_account_credential_update_intent( &self, id: &str ) -> Result<CUIntentToken, ClientError>
pub async fn idm_account_credential_update_begin( &self, id: &str ) -> Result<(CUSessionToken, CUStatus), ClientError>
pub async fn idm_account_credential_update_exchange( &self, intent_token: CUIntentToken ) -> Result<(CUSessionToken, CUStatus), ClientError>
pub async fn idm_account_credential_update_status( &self, session_token: &CUSessionToken ) -> Result<CUStatus, ClientError>
pub async fn idm_account_credential_update_set_password( &self, session_token: &CUSessionToken, pw: &str ) -> Result<CUStatus, ClientError>
pub async fn idm_account_credential_update_cancel_mfareg( &self, session_token: &CUSessionToken ) -> Result<CUStatus, ClientError>
pub async fn idm_account_credential_update_init_totp( &self, session_token: &CUSessionToken ) -> Result<CUStatus, ClientError>
pub async fn idm_account_credential_update_check_totp( &self, session_token: &CUSessionToken, totp_chal: u32, label: &str ) -> Result<CUStatus, ClientError>
pub async fn idm_account_credential_update_accept_sha1_totp( &self, session_token: &CUSessionToken ) -> Result<CUStatus, ClientError>
pub async fn idm_account_credential_update_remove_totp( &self, session_token: &CUSessionToken, label: &str ) -> Result<CUStatus, ClientError>
pub async fn idm_account_credential_update_backup_codes_generate( &self, session_token: &CUSessionToken ) -> Result<CUStatus, ClientError>
pub async fn idm_account_credential_update_primary_remove( &self, session_token: &CUSessionToken ) -> Result<CUStatus, ClientError>
pub async fn idm_account_credential_update_passkey_init( &self, session_token: &CUSessionToken ) -> Result<CUStatus, ClientError>
pub async fn idm_account_credential_update_passkey_finish( &self, session_token: &CUSessionToken, label: String, registration: RegisterPublicKeyCredential ) -> Result<CUStatus, ClientError>
pub async fn idm_account_credential_update_passkey_remove( &self, session_token: &CUSessionToken, uuid: Uuid ) -> Result<CUStatus, ClientError>
pub async fn idm_account_credential_update_commit( &self, session_token: &CUSessionToken ) -> Result<(), ClientError>
pub async fn idm_account_radius_token_get( &self, id: &str ) -> Result<RadiusAuthToken, ClientError>
pub async fn idm_account_unix_cred_verify( &self, id: &str, cred: &str ) -> Result<Option<UnixUserToken>, ClientError>
pub async fn idm_account_get_ssh_pubkey( &self, id: &str, tag: &str ) -> Result<Option<String>, ClientError>
pub async fn idm_account_get_ssh_pubkeys( &self, id: &str ) -> Result<Vec<String>, ClientError>
pub async fn idm_domain_get(&self) -> Result<Entry, ClientError>
sourcepub async fn idm_domain_set_display_name(
&self,
new_display_name: &str
) -> Result<(), ClientError>
pub async fn idm_domain_set_display_name( &self, new_display_name: &str ) -> Result<(), ClientError>
Sets the domain display name using a PUT request