pub struct AuthClient {
pub(crate) client: Client,
}Fields§
§client: ClientImplementations§
Source§impl AuthClient
impl AuthClient
pub async fn login_access_token( &self, input: &AccessTokenLoginRequest, ) -> Result<AccessTokenLoginResponse, LoginError>
Source§impl AuthClient
impl AuthClient
pub fn password_strength( &self, password: String, email: String, additional_inputs: Vec<String>, ) -> u8
pub fn satisfies_policy( &self, password: String, strength: u8, policy: &MasterPasswordPolicyOptions, ) -> bool
pub fn make_register_keys( &self, email: String, password: String, kdf: Kdf, ) -> Result<RegisterKeyResponse, CryptoError>
pub fn make_register_tde_keys( &self, email: String, org_public_key: B64, remember_device: bool, ) -> Result<RegisterTdeKeyResponse, EncryptionSettingsError>
pub fn make_key_connector_keys( &self, ) -> Result<KeyConnectorResponse, CryptoError>
pub async fn prelogin(&self, email: String) -> Result<Kdf, PreloginError>
pub async fn login_password( &self, input: &PasswordLoginRequest, ) -> Result<PasswordLoginResponse, LoginError>
pub async fn login_api_key( &self, input: &ApiKeyLoginRequest, ) -> Result<ApiKeyLoginResponse, LoginError>
pub async fn send_two_factor_email( &self, tf: &TwoFactorEmailRequest, ) -> Result<(), TwoFactorEmailError>
pub fn validate_password( &self, password: String, password_hash: B64, ) -> Result<bool, AuthValidateError>
pub fn validate_password_user_key( &self, password: String, encrypted_user_key: String, ) -> Result<B64, AuthValidateError>
pub fn validate_pin( &self, pin: String, pin_protected_user_key: EncString, ) -> Result<bool, AuthValidateError>
Sourcepub fn validate_pin_protected_user_key_envelope(
&self,
pin: String,
pin_protected_user_key_envelope: PasswordProtectedKeyEnvelope,
) -> bool
pub fn validate_pin_protected_user_key_envelope( &self, pin: String, pin_protected_user_key_envelope: PasswordProtectedKeyEnvelope, ) -> bool
Validates a PIN against a PIN-protected user key envelope.
Returns false if validation fails for any reason:
- The PIN is incorrect
- The envelope is corrupted or malformed
pub fn new_auth_request( &self, email: &str, ) -> Result<AuthRequestResponse, CryptoError>
pub fn approve_auth_request( &self, public_key: B64, ) -> Result<UnsignedSharedKey, ApproveAuthRequestError>
pub fn trust_device(&self) -> Result<TrustDeviceResponse, TrustDeviceError>
Source§impl AuthClient
impl AuthClient
pub async fn login_device( &self, email: String, device_identifier: String, ) -> Result<NewAuthRequestResponse, LoginError>
pub async fn login_device_complete( &self, auth_req: NewAuthRequestResponse, ) -> Result<(), LoginError>
Auto Trait Implementations§
impl Freeze for AuthClient
impl !RefUnwindSafe for AuthClient
impl Send for AuthClient
impl Sync for AuthClient
impl Unpin for AuthClient
impl UnsafeUnpin for AuthClient
impl !UnwindSafe for AuthClient
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
Mutably borrows from an owned value. Read more
§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
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
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>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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>
Converts
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>
Converts
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