pub struct AccountManagerProxy { /* private fields */ }
Implementations§
source§impl AccountManagerProxy
impl AccountManagerProxy
sourcepub fn take_event_stream(&self) -> AccountManagerEventStream
pub fn take_event_stream(&self) -> AccountManagerEventStream
Get a Stream of events from the remote end of the AccountManager protocol
Panics
Panics if the event stream was already taken.
sourcepub fn get_account_ids(&self) -> QueryResponseFut<Vec<u64>>
pub fn get_account_ids(&self) -> QueryResponseFut<Vec<u64>>
Returns a vector of all accounts provisioned on the device.
sourcepub fn get_account_metadata(
&self,
id: u64
) -> QueryResponseFut<AccountManagerGetAccountMetadataResult>
pub fn get_account_metadata( &self, id: u64 ) -> QueryResponseFut<AccountManagerGetAccountMetadataResult>
Returns the metadata for a single account.
id
The account’s identifier as returned by GetAccountIds()
sourcepub fn get_account(
&self,
payload: AccountManagerGetAccountRequest
) -> QueryResponseFut<AccountManagerGetAccountResult>
pub fn get_account( &self, payload: AccountManagerGetAccountRequest ) -> QueryResponseFut<AccountManagerGetAccountResult>
Connects a channel to read properties of and perform operations on one account. If the account is locked, an interactive authentication attempt will be invoked as part of this call.
id
[required] The account’s identifier as returned by GetAccountIds()
interaction
An Interaction
channel enabling the user to complete
authentication challenges if these are necessary.
account
[required] The server end of an Account
channel
Fails with:
INVALID_REQUEST
if theid
does not exist.FAILED_PRECONDITION
if the account is locked but nointeraction
channel was supplied to perform authentication.ABORTED
if the client closes theinteraction
channel.
sourcepub fn deprecated_get_account(
&self,
id: u64,
password: &str,
account: ServerEnd<AccountMarker>
) -> QueryResponseFut<AccountManagerDeprecatedGetAccountResult>
pub fn deprecated_get_account( &self, id: u64, password: &str, account: ServerEnd<AccountMarker> ) -> QueryResponseFut<AccountManagerDeprecatedGetAccountResult>
Connects a channel to read properties of and perform operations on one account. If the account is locked, the supplied password will be used to attempt authentication.
This is a temporary method used for an initial prototype of
password-based encryption. Its usage will be replaced by the
GetAccount
method where the hardcoded authentication=password
assumption is replaced by a channel that can support different
authentication mechanisms.
id
The account’s identifier as returned by GetAccountIds()
password
The account’s password
account
The server end of an Account
channel
Fails with FAILED_AUTHENTICATION
if the password was not correct.
sourcepub fn register_account_listener(
&self,
payload: AccountManagerRegisterAccountListenerRequest
) -> QueryResponseFut<AccountManagerRegisterAccountListenerResult>
pub fn register_account_listener( &self, payload: AccountManagerRegisterAccountListenerRequest ) -> QueryResponseFut<AccountManagerRegisterAccountListenerResult>
Connects a channel that will receive changes in the provisioned accounts and their authentication state. Optionally this channel will also receive the initial set of accounts and authentication states onto which changes may be applied.
listener
[required] The client end of an AccountListener
channel
initial_state
If true, the listener will receive an event containing
the initial state for all accounts.
add_account
If true, the listener will receive events when a new
account is added to the device.
remove_account
If true, the listener will receive events when an
account is removed from the device.
granularity
An AuthChangeGranularity
expressing the magnitude of
change in authentication state that will lead to
AuthStateChange events. If absent, AuthStateChange events
will not be sent.
sourcepub fn remove_account(
&self,
id: u64
) -> QueryResponseFut<AccountManagerRemoveAccountResult>
pub fn remove_account( &self, id: u64 ) -> QueryResponseFut<AccountManagerRemoveAccountResult>
Removes an account from the device.
id
The account’s identifier as returned by GetAccountIds()
sourcepub fn provision_new_account(
&self,
payload: AccountManagerProvisionNewAccountRequest
) -> QueryResponseFut<AccountManagerProvisionNewAccountResult>
pub fn provision_new_account( &self, payload: AccountManagerProvisionNewAccountRequest ) -> QueryResponseFut<AccountManagerProvisionNewAccountResult>
Adds a new account to the device. If this operation if successful the
newly created account will be unlocked and may be accessed using
GetAccount
without further authentication.
lifetime
[required] The lifetime of the account
metadata
[required] Metadata for the new account
interaction
An Interaction
channel enabling the user to select and
enroll authentication mechanisms for the new account.
Returns: account_id
The identifier of the newly added account
Fails with:
INVALID_REQUEST
if policy requires authentication factors for the new account but nointeraction
channel was supplied.ABORTED
if the client closes theinteraction
channel.
sourcepub fn deprecated_provision_new_account(
&self,
password: &str,
metadata: AccountMetadata,
account: ServerEnd<AccountMarker>
) -> QueryResponseFut<AccountManagerDeprecatedProvisionNewAccountResult>
pub fn deprecated_provision_new_account( &self, password: &str, metadata: AccountMetadata, account: ServerEnd<AccountMarker> ) -> QueryResponseFut<AccountManagerDeprecatedProvisionNewAccountResult>
Adds a new system account to the device using the supplied password as the only authentication mechanism. The account is automatically unlocked and the supplied channel is connected to read properties of and perform operations on the account.
This is a temporary method used for an initial prototype of
password-based encryption. Its usage will be replaced by the
ProvisionNewAccount
method where the hardcoded
authentication=password assumption is replaced by a channel
that can support different authentication mechanisms.
password
The password to be used for the new account
metadata
Metadata for the new account
account
The server end of an Account
channel
Fails with INVALID_REQUEST
if the password does not meet
minimum strength requirements.
Trait Implementations§
source§impl AccountManagerProxyInterface for AccountManagerProxy
impl AccountManagerProxyInterface for AccountManagerProxy
type GetAccountIdsResponseFut = QueryResponseFut<Vec<u64, Global>>
fn get_account_ids(&self) -> Self::GetAccountIdsResponseFut
type GetAccountMetadataResponseFut = QueryResponseFut<Result<AccountMetadata, Error>>
fn get_account_metadata(&self, id: u64) -> Self::GetAccountMetadataResponseFut
type GetAccountResponseFut = QueryResponseFut<Result<(), Error>>
fn get_account( &self, payload: AccountManagerGetAccountRequest ) -> Self::GetAccountResponseFut
type DeprecatedGetAccountResponseFut = QueryResponseFut<Result<(), Error>>
fn deprecated_get_account( &self, id: u64, password: &str, account: ServerEnd<AccountMarker> ) -> Self::DeprecatedGetAccountResponseFut
type RegisterAccountListenerResponseFut = QueryResponseFut<Result<(), Error>>
fn register_account_listener( &self, payload: AccountManagerRegisterAccountListenerRequest ) -> Self::RegisterAccountListenerResponseFut
type RemoveAccountResponseFut = QueryResponseFut<Result<(), Error>>
fn remove_account(&self, id: u64) -> Self::RemoveAccountResponseFut
type ProvisionNewAccountResponseFut = QueryResponseFut<Result<u64, Error>>
fn provision_new_account( &self, payload: AccountManagerProvisionNewAccountRequest ) -> Self::ProvisionNewAccountResponseFut
type DeprecatedProvisionNewAccountResponseFut = QueryResponseFut<Result<(), Error>>
fn deprecated_provision_new_account( &self, password: &str, metadata: AccountMetadata, account: ServerEnd<AccountMarker> ) -> Self::DeprecatedProvisionNewAccountResponseFut
source§impl Clone for AccountManagerProxy
impl Clone for AccountManagerProxy
source§fn clone(&self) -> AccountManagerProxy
fn clone(&self) -> AccountManagerProxy
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for AccountManagerProxy
impl Debug for AccountManagerProxy
source§impl Proxy for AccountManagerProxy
impl Proxy for AccountManagerProxy
§type Protocol = AccountManagerMarker
type Protocol = AccountManagerMarker
Proxy
controls.