pub struct ManagerSynchronousProxy { /* private fields */ }
Implementations§
source§impl ManagerSynchronousProxy
impl ManagerSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
sourcepub fn wait_for_event(&self, deadline: Time) -> Result<ManagerEvent, Error>
pub fn wait_for_event(&self, deadline: Time) -> Result<ManagerEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
sourcepub fn add_credential(
&self,
params: AddCredentialParams,
___deadline: Time
) -> Result<ManagerAddCredentialResult, Error>
pub fn add_credential( &self, params: AddCredentialParams, ___deadline: Time ) -> Result<ManagerAddCredentialResult, Error>
Adds a low entropy credential into the system.
params
see AddCredentialParams
.
Success returns a label for the newly provisioned credential. This
acts as a identifier which is used to check the credential or remove it
later on. This should be stored by the caller.
sourcepub fn remove_credential(
&self,
label: u64,
___deadline: Time
) -> Result<ManagerRemoveCredentialResult, Error>
pub fn remove_credential( &self, label: u64, ___deadline: Time ) -> Result<ManagerRemoveCredentialResult, Error>
Removes a credential with the provided label.
On Failure: INVALID_LABEL if a label is provided which is not in the tree.
sourcepub fn check_credential(
&self,
params: CheckCredentialParams,
___deadline: Time
) -> Result<ManagerCheckCredentialResult, Error>
pub fn check_credential( &self, params: CheckCredentialParams, ___deadline: Time ) -> Result<ManagerCheckCredentialResult, Error>
Attempts to authenticate a credential. It checks whether the le_secret
for a given label
is correct.
On Success:
See CheckCredentialResponse
.
On Failure:
INVALID_LABEL if an invalid label was entered.
TOO_MANY_ATTEMPTS if too many incorrect attempts are made defined by the
delay_schedule
set on AddCredential.
INVALID_SECRET for an incorrect authentication attempt.
CORRUPT_METADATA for invalid credential metadata.