pub struct EmergencyAccessClient {
pub(crate) api_configurations: Arc<ApiConfigurations>,
pub(crate) key_store: KeyStore<KeySlotIds>,
}Expand description
Client for emergency access operations, performed as the grantor or the grantee.
Fields§
§api_configurations: Arc<ApiConfigurations>§key_store: KeyStore<KeySlotIds>Implementations§
Source§impl EmergencyAccessClient
impl EmergencyAccessClient
Sourcepub async fn accept(
&self,
emergency_access_id: EmergencyAccessId,
token: String,
) -> Result<(), EmergencyAccessAcceptError>
pub async fn accept( &self, emergency_access_id: EmergencyAccessId, token: String, ) -> Result<(), EmergencyAccessAcceptError>
Accepts an emergency access invite with the token from the invite email. Step 2 of the
setup; the grantor confirms next.
Called by the grantee.
Source§impl EmergencyAccessClient
impl EmergencyAccessClient
Sourcepub async fn approve(
&self,
emergency_access_id: EmergencyAccessId,
) -> Result<(), EmergencyAccessApproveError>
pub async fn approve( &self, emergency_access_id: EmergencyAccessId, ) -> Result<(), EmergencyAccessApproveError>
Approves the grantee’s access request before the wait time passes.
Called by the grantor.
Source§impl EmergencyAccessClient
impl EmergencyAccessClient
Sourcepub async fn confirm(
&self,
emergency_access_id: EmergencyAccessId,
grantee_public_key: B64,
) -> Result<(), EmergencyAccessConfirmError>
pub async fn confirm( &self, emergency_access_id: EmergencyAccessId, grantee_public_key: B64, ) -> Result<(), EmergencyAccessConfirmError>
Shares the current user’s user key with the grantee. Step 3 of the setup.
grantee_public_key is the base64 SPKI DER public key the user verified through the
grantee’s fingerprint. It is never fetched here, so an unverified key can’t slip in.
Called by the grantor.
Source§impl EmergencyAccessClient
impl EmergencyAccessClient
Sourcepub async fn delete(
&self,
emergency_access_id: EmergencyAccessId,
) -> Result<(), EmergencyAccessDeleteError>
pub async fn delete( &self, emergency_access_id: EmergencyAccessId, ) -> Result<(), EmergencyAccessDeleteError>
Deletes an emergency access.
Called by either the grantor or the grantee.
Source§impl EmergencyAccessClient
impl EmergencyAccessClient
Sourcepub async fn get(
&self,
emergency_access_id: EmergencyAccessId,
) -> Result<GranteeEmergencyAccess, EmergencyAccessGetError>
pub async fn get( &self, emergency_access_id: EmergencyAccessId, ) -> Result<GranteeEmergencyAccess, EmergencyAccessGetError>
Fetches an emergency access the current user granted.
Called by the grantor.
Source§impl EmergencyAccessClient
impl EmergencyAccessClient
Sourcepub async fn get_grantor_policies(
&self,
emergency_access_id: EmergencyAccessId,
) -> Result<Vec<Policy>, EmergencyAccessGetGrantorPoliciesError>
pub async fn get_grantor_policies( &self, emergency_access_id: EmergencyAccessId, ) -> Result<Vec<Policy>, EmergencyAccessGetGrantorPoliciesError>
Fetches the policies of the organizations the grantor owns, to enforce them on the new master password during a takeover.
The server only returns policies when the grantor owns an organization: other members are removed from their organizations on takeover, so their policies don’t apply.
Called by the grantee.
Source§impl EmergencyAccessClient
impl EmergencyAccessClient
Sourcepub async fn initiate(
&self,
emergency_access_id: EmergencyAccessId,
) -> Result<(), EmergencyAccessInitiateError>
pub async fn initiate( &self, emergency_access_id: EmergencyAccessId, ) -> Result<(), EmergencyAccessInitiateError>
Requests access to the grantor’s account. Access is granted once the grantor approves or the wait time passes.
Called by the grantee.
Source§impl EmergencyAccessClient
impl EmergencyAccessClient
Sourcepub async fn invite(
&self,
grantee_email: String,
type: EmergencyAccessType,
wait_time_days: i32,
) -> Result<(), EmergencyAccessInviteError>
pub async fn invite( &self, grantee_email: String, type: EmergencyAccessType, wait_time_days: i32, ) -> Result<(), EmergencyAccessInviteError>
Invites grantee_email to become a trusted emergency contact. Step 1 of the setup; the
grantee accepts next.
Called by the grantor.
Source§impl EmergencyAccessClient
impl EmergencyAccessClient
Sourcepub async fn list_granted(
&self,
) -> Result<Vec<GrantorEmergencyAccess>, EmergencyAccessListGrantedError>
pub async fn list_granted( &self, ) -> Result<Vec<GrantorEmergencyAccess>, EmergencyAccessListGrantedError>
Lists the emergency accesses granted to the current user, one per grantor.
Called by the grantee.
Source§impl EmergencyAccessClient
impl EmergencyAccessClient
Sourcepub async fn list_trusted(
&self,
) -> Result<Vec<GranteeEmergencyAccess>, EmergencyAccessListTrustedError>
pub async fn list_trusted( &self, ) -> Result<Vec<GranteeEmergencyAccess>, EmergencyAccessListTrustedError>
Lists the emergency accesses the current user granted, one per trusted contact.
Called by the grantor.
Source§impl EmergencyAccessClient
impl EmergencyAccessClient
Sourcepub async fn reinvite(
&self,
emergency_access_id: EmergencyAccessId,
) -> Result<(), EmergencyAccessReinviteError>
pub async fn reinvite( &self, emergency_access_id: EmergencyAccessId, ) -> Result<(), EmergencyAccessReinviteError>
Re-sends the invite email of an emergency access the grantee has not accepted yet.
Called by the grantor.
Source§impl EmergencyAccessClient
impl EmergencyAccessClient
Sourcepub async fn reject(
&self,
emergency_access_id: EmergencyAccessId,
) -> Result<(), EmergencyAccessRejectError>
pub async fn reject( &self, emergency_access_id: EmergencyAccessId, ) -> Result<(), EmergencyAccessRejectError>
Rejects the grantee’s access request.
Called by the grantor.
Source§impl EmergencyAccessClient
impl EmergencyAccessClient
Sourcepub async fn takeover(
&self,
emergency_access_id: EmergencyAccessId,
new_password: String,
grantor_email: String,
) -> Result<(), EmergencyAccessTakeoverError>
pub async fn takeover( &self, emergency_access_id: EmergencyAccessId, new_password: String, grantor_email: String, ) -> Result<(), EmergencyAccessTakeoverError>
Sets a new master password on the grantor’s account of an approved takeover emergency access.
grantor_email is used as salt when the server doesn’t return one.
Called by the grantee.
Source§impl EmergencyAccessClient
impl EmergencyAccessClient
Sourcepub async fn update(
&self,
emergency_access_id: EmergencyAccessId,
type: EmergencyAccessType,
wait_time_days: i32,
) -> Result<(), EmergencyAccessUpdateError>
pub async fn update( &self, emergency_access_id: EmergencyAccessId, type: EmergencyAccessType, wait_time_days: i32, ) -> Result<(), EmergencyAccessUpdateError>
Changes the access type and wait time of an emergency access.
Called by the grantor.
Source§impl EmergencyAccessClient
impl EmergencyAccessClient
Sourcepub async fn view_vault_items(
&self,
emergency_access_id: EmergencyAccessId,
) -> Result<DecryptCipherResult, EmergencyAccessViewError>
pub async fn view_vault_items( &self, emergency_access_id: EmergencyAccessId, ) -> Result<DecryptCipherResult, EmergencyAccessViewError>
Fetches and decrypts the grantor’s vault items of an approved view-only emergency access.
Trait Implementations§
Source§impl From<EmergencyAccessClient> for JsValue
impl From<EmergencyAccessClient> for JsValue
Source§fn from(value: EmergencyAccessClient) -> Self
fn from(value: EmergencyAccessClient) -> Self
Source§impl FromClient for EmergencyAccessClient
impl FromClient for EmergencyAccessClient
Source§fn from_client(client: &Client) -> Self
fn from_client(client: &Client) -> Self
Client] reference.Source§impl FromWasm for EmergencyAccessClient
Available on crate feature wasm only.
impl FromWasm for EmergencyAccessClient
wasm only.Source§impl FromWasmAbi for EmergencyAccessClient
impl FromWasmAbi for EmergencyAccessClient
Source§impl IntoWasmAbi for EmergencyAccessClient
impl IntoWasmAbi for EmergencyAccessClient
Source§impl RefFromWasmAbi for EmergencyAccessClient
impl RefFromWasmAbi for EmergencyAccessClient
Source§type Anchor = RcRef<EmergencyAccessClient>
type Anchor = RcRef<EmergencyAccessClient>
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.impl SupportsConstructor for EmergencyAccessClient
impl SupportsInstanceProperty for EmergencyAccessClient
impl SupportsStaticProperty for EmergencyAccessClient
Source§impl ToWasm for EmergencyAccessClient
Available on crate feature wasm only.
impl ToWasm for EmergencyAccessClient
wasm only.Source§impl VectorFromWasmAbi for EmergencyAccessClient
impl VectorFromWasmAbi for EmergencyAccessClient
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[EmergencyAccessClient]>
Source§impl VectorIntoWasmAbi for EmergencyAccessClient
impl VectorIntoWasmAbi for EmergencyAccessClient
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[EmergencyAccessClient]>) -> Self::Abi
Source§impl WasmDescribe for EmergencyAccessClient
impl WasmDescribe for EmergencyAccessClient
Auto Trait Implementations§
impl !RefUnwindSafe for EmergencyAccessClient
impl !UnwindSafe for EmergencyAccessClient
impl Freeze for EmergencyAccessClient
impl Send for EmergencyAccessClient
impl Sync for EmergencyAccessClient
impl Unpin for EmergencyAccessClient
impl UnsafeUnpin for EmergencyAccessClient
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
Arc<> Read more§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.