Struct ClientAuth
pub struct ClientAuth<'a> {
pub(crate) client: &'a Client,
}
Fields§
§client: &'a Client
Implementations§
§impl<'a> ClientAuth<'a>
impl<'a> ClientAuth<'a>
pub async fn renew_token(&self) -> Result<(), Error>
pub async fn login_access_token( &self, input: &AccessTokenLoginRequest, ) -> Result<AccessTokenLoginResponse, Error>
§impl<'a> ClientAuth<'a>
impl<'a> ClientAuth<'a>
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, Error>
pub fn make_register_tde_keys( &self, email: String, org_public_key: String, remember_device: bool, ) -> Result<RegisterTdeKeyResponse, Error>
pub fn make_key_connector_keys( &self, ) -> Result<KeyConnectorResponse, CryptoError>
pub async fn register(&self, input: &RegisterRequest) -> Result<(), Error>
pub async fn prelogin(&self, email: String) -> Result<Kdf, Error>
pub async fn login_password( &self, input: &PasswordLoginRequest, ) -> Result<PasswordLoginResponse, Error>
pub async fn login_api_key( &self, input: &ApiKeyLoginRequest, ) -> Result<ApiKeyLoginResponse, Error>
pub async fn send_two_factor_email( &self, tf: &TwoFactorEmailRequest, ) -> Result<(), Error>
pub fn validate_password( &self, password: String, password_hash: String, ) -> Result<bool, Error>
pub fn validate_password_user_key( &self, password: String, encrypted_user_key: String, ) -> Result<String, Error>
pub fn validate_pin( &self, pin: String, pin_protected_user_key: EncString, ) -> Result<bool, Error>
pub fn new_auth_request( &self, email: &str, ) -> Result<AuthRequestResponse, Error>
pub fn approve_auth_request( &self, public_key: String, ) -> Result<AsymmetricEncString, Error>
pub fn trust_device(&self) -> Result<TrustDeviceResponse, Error>
§impl<'a> ClientAuth<'a>
impl<'a> ClientAuth<'a>
pub async fn login_device( &self, email: String, device_identifier: String, ) -> Result<NewAuthRequestResponse, Error>
pub async fn login_device_complete( &self, auth_req: NewAuthRequestResponse, ) -> Result<(), Error>
Auto Trait Implementations§
impl<'a> Freeze for ClientAuth<'a>
impl<'a> !RefUnwindSafe for ClientAuth<'a>
impl<'a> Send for ClientAuth<'a>
impl<'a> Sync for ClientAuth<'a>
impl<'a> Unpin for ClientAuth<'a>
impl<'a> !UnwindSafe for ClientAuth<'a>
Blanket Implementations§
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> 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