Struct EmergencyAccessClient
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§
§impl EmergencyAccessClient
impl EmergencyAccessClient
pub 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.
§impl EmergencyAccessClient
impl EmergencyAccessClient
pub 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.
§impl EmergencyAccessClient
impl EmergencyAccessClient
pub 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.
§impl EmergencyAccessClient
impl EmergencyAccessClient
pub 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.
§impl EmergencyAccessClient
impl EmergencyAccessClient
pub 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.
§impl EmergencyAccessClient
impl EmergencyAccessClient
pub 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§
§impl FromClient for EmergencyAccessClient
impl FromClient for EmergencyAccessClient
§fn from_client(client: &Client) -> EmergencyAccessClient
fn from_client(client: &Client) -> EmergencyAccessClient
Client] reference.§impl FromWasmAbi for EmergencyAccessClient
impl FromWasmAbi for EmergencyAccessClient
§impl IntoWasmAbi for EmergencyAccessClient
impl IntoWasmAbi for EmergencyAccessClient
§impl LongRefFromWasmAbi for EmergencyAccessClient
impl LongRefFromWasmAbi for EmergencyAccessClient
§type Anchor = RcRef<EmergencyAccessClient>
type Anchor = RcRef<EmergencyAccessClient>
RefFromWasmAbi::Anchor§unsafe fn long_ref_from_abi(
js: <EmergencyAccessClient as LongRefFromWasmAbi>::Abi,
) -> <EmergencyAccessClient as LongRefFromWasmAbi>::Anchor
unsafe fn long_ref_from_abi( js: <EmergencyAccessClient as LongRefFromWasmAbi>::Abi, ) -> <EmergencyAccessClient as LongRefFromWasmAbi>::Anchor
RefFromWasmAbi::ref_from_abi§impl OptionFromWasmAbi for EmergencyAccessClient
impl OptionFromWasmAbi for EmergencyAccessClient
§fn is_none(abi: &<EmergencyAccessClient as FromWasmAbi>::Abi) -> bool
fn is_none(abi: &<EmergencyAccessClient as FromWasmAbi>::Abi) -> bool
None, and otherwise it will be passed to
FromWasmAbi.§impl OptionIntoWasmAbi for EmergencyAccessClient
impl OptionIntoWasmAbi for EmergencyAccessClient
§fn none() -> <EmergencyAccessClient as IntoWasmAbi>::Abi
fn none() -> <EmergencyAccessClient as IntoWasmAbi>::Abi
None branch of this option. Read more§impl RefFromWasmAbi for EmergencyAccessClient
impl RefFromWasmAbi for EmergencyAccessClient
§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.§unsafe fn ref_from_abi(
js: <EmergencyAccessClient as RefFromWasmAbi>::Abi,
) -> <EmergencyAccessClient as RefFromWasmAbi>::Anchor
unsafe fn ref_from_abi( js: <EmergencyAccessClient as RefFromWasmAbi>::Abi, ) -> <EmergencyAccessClient as RefFromWasmAbi>::Anchor
§impl RefMutFromWasmAbi for EmergencyAccessClient
impl RefMutFromWasmAbi for EmergencyAccessClient
§type Anchor = RcRefMut<EmergencyAccessClient>
type Anchor = RcRefMut<EmergencyAccessClient>
RefFromWasmAbi::Anchor§unsafe fn ref_mut_from_abi(
js: <EmergencyAccessClient as RefMutFromWasmAbi>::Abi,
) -> <EmergencyAccessClient as RefMutFromWasmAbi>::Anchor
unsafe fn ref_mut_from_abi( js: <EmergencyAccessClient as RefMutFromWasmAbi>::Abi, ) -> <EmergencyAccessClient as RefMutFromWasmAbi>::Anchor
RefFromWasmAbi::ref_from_abi§impl TryFromJsValue for EmergencyAccessClient
impl TryFromJsValue for EmergencyAccessClient
§fn try_from_js_value(value: JsValue) -> Result<EmergencyAccessClient, JsValue>
fn try_from_js_value(value: JsValue) -> Result<EmergencyAccessClient, JsValue>
§fn try_from_js_value_ref(value: &JsValue) -> Option<EmergencyAccessClient>
fn try_from_js_value_ref(value: &JsValue) -> Option<EmergencyAccessClient>
§impl VectorFromWasmAbi for EmergencyAccessClient
impl VectorFromWasmAbi for EmergencyAccessClient
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi( js: <EmergencyAccessClient as VectorFromWasmAbi>::Abi, ) -> Box<[EmergencyAccessClient]>
§impl VectorIntoWasmAbi for EmergencyAccessClient
impl VectorIntoWasmAbi for EmergencyAccessClient
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi( vector: Box<[EmergencyAccessClient]>, ) -> <EmergencyAccessClient as VectorIntoWasmAbi>::Abi
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.