Struct kanidm_client::KanidmClient
source · [−]pub struct KanidmClient { /* private fields */ }
Implementations
sourceimpl 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>
sourceimpl 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>
pub async fn idm_service_account_create(
&self,
name: &str,
displayname: &str
) -> Result<(), ClientError>
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>
) -> Result<String, ClientError>
pub async fn idm_service_account_destroy_api_token(
&self,
id: &str,
token_id: Uuid
) -> Result<(), ClientError>
sourceimpl 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>
sourceimpl 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)
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: PublicKeyCredential
) -> Result<AuthResponse, ClientError>
pub async fn auth_step_passkey_complete(
&self,
pkc: 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: 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
) -> 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
) -> 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
pub async fn idm_domain_get_ssid(&self) -> Result<String, ClientError>
pub async fn idm_domain_set_ssid(&self, ssid: &str) -> Result<(), ClientError>
pub async fn idm_domain_reset_token_key(&self) -> Result<(), ClientError>
pub async fn idm_schema_list(&self) -> Result<Vec<Entry>, ClientError>
pub async fn idm_schema_attributetype_list(
&self
) -> Result<Vec<Entry>, ClientError>
pub async fn idm_schema_attributetype_get(
&self,
id: &str
) -> Result<Option<Entry>, ClientError>
pub async fn idm_schema_classtype_list(&self) -> Result<Vec<Entry>, ClientError>
pub async fn idm_schema_classtype_get(
&self,
id: &str
) -> Result<Option<Entry>, ClientError>
pub async fn idm_oauth2_rs_list(&self) -> Result<Vec<Entry>, ClientError>
pub async fn idm_oauth2_rs_basic_create(
&self,
name: &str,
displayname: &str,
origin: &str
) -> Result<(), ClientError>
pub async fn idm_oauth2_rs_get(
&self,
id: &str
) -> Result<Option<Entry>, ClientError>
pub async fn idm_oauth2_rs_update(
&self,
id: &str,
name: Option<&str>,
displayname: Option<&str>,
origin: Option<&str>,
scopes: Option<Vec<&str>>,
reset_secret: bool,
reset_token_key: bool,
reset_sign_key: bool
) -> Result<(), ClientError>
pub async fn idm_oauth2_rs_create_scope_map(
&self,
id: &str,
group: &str,
scopes: Vec<&str>
) -> Result<(), ClientError>
pub async fn idm_oauth2_rs_delete_scope_map(
&self,
id: &str,
group: &str
) -> Result<(), ClientError>
pub async fn idm_oauth2_rs_delete(&self, id: &str) -> Result<(), ClientError>
pub async fn idm_oauth2_rs_enable_pkce(
&self,
id: &str
) -> Result<(), ClientError>
pub async fn idm_oauth2_rs_disable_pkce(
&self,
id: &str
) -> Result<(), ClientError>
pub async fn idm_oauth2_rs_enable_legacy_crypto(
&self,
id: &str
) -> Result<(), ClientError>
pub async fn idm_oauth2_rs_disable_legacy_crypto(
&self,
id: &str
) -> Result<(), ClientError>
pub async fn idm_oauth2_rs_prefer_short_username(
&self,
id: &str
) -> Result<(), ClientError>
pub async fn idm_oauth2_rs_prefer_spn_username(
&self,
id: &str
) -> Result<(), ClientError>
pub async fn recycle_bin_list(&self) -> Result<Vec<Entry>, ClientError>
pub async fn recycle_bin_get(
&self,
id: &str
) -> Result<Option<Entry>, ClientError>
pub async fn recycle_bin_revive(&self, id: &str) -> Result<(), ClientError>
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for KanidmClient
impl Send for KanidmClient
impl Sync for KanidmClient
impl Unpin for KanidmClient
impl !UnwindSafe for KanidmClient
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more