pub struct MultiFactorAuthApi<'a> { /* private fields */ }Implementations§
Source§impl<'a> MultiFactorAuthApi<'a>
impl<'a> MultiFactorAuthApi<'a>
Sourcepub async fn verify_challenge(
&self,
id: &str,
params: VerifyChallengeParams,
) -> Result<AuthenticationChallengeVerifyResponse, Error>
pub async fn verify_challenge( &self, id: &str, params: VerifyChallengeParams, ) -> Result<AuthenticationChallengeVerifyResponse, Error>
Verify Challenge
Verifies an Authentication Challenge.
Sourcepub async fn verify_challenge_with_options(
&self,
id: &str,
params: VerifyChallengeParams,
options: Option<&RequestOptions>,
) -> Result<AuthenticationChallengeVerifyResponse, Error>
pub async fn verify_challenge_with_options( &self, id: &str, params: VerifyChallengeParams, options: Option<&RequestOptions>, ) -> Result<AuthenticationChallengeVerifyResponse, Error>
Variant of Self::verify_challenge that accepts per-request crate::RequestOptions.
Sourcepub async fn enroll_factor(
&self,
params: EnrollFactorParams,
) -> Result<AuthenticationFactorEnrolled, Error>
pub async fn enroll_factor( &self, params: EnrollFactorParams, ) -> Result<AuthenticationFactorEnrolled, Error>
Enroll Factor
Enrolls an Authentication Factor to be used as an additional factor of authentication. The returned ID should be used to create an authentication Challenge.
Sourcepub async fn enroll_factor_with_options(
&self,
params: EnrollFactorParams,
options: Option<&RequestOptions>,
) -> Result<AuthenticationFactorEnrolled, Error>
pub async fn enroll_factor_with_options( &self, params: EnrollFactorParams, options: Option<&RequestOptions>, ) -> Result<AuthenticationFactorEnrolled, Error>
Variant of Self::enroll_factor that accepts per-request crate::RequestOptions.
Sourcepub async fn get_factor(&self, id: &str) -> Result<AuthenticationFactor, Error>
pub async fn get_factor(&self, id: &str) -> Result<AuthenticationFactor, Error>
Get Factor
Gets an Authentication Factor.
Sourcepub async fn get_factor_with_options(
&self,
id: &str,
options: Option<&RequestOptions>,
) -> Result<AuthenticationFactor, Error>
pub async fn get_factor_with_options( &self, id: &str, options: Option<&RequestOptions>, ) -> Result<AuthenticationFactor, Error>
Variant of Self::get_factor that accepts per-request crate::RequestOptions.
Sourcepub async fn delete_factor(&self, id: &str) -> Result<(), Error>
pub async fn delete_factor(&self, id: &str) -> Result<(), Error>
Delete Factor
Permanently deletes an Authentication Factor. It cannot be undone.
Sourcepub async fn delete_factor_with_options(
&self,
id: &str,
options: Option<&RequestOptions>,
) -> Result<(), Error>
pub async fn delete_factor_with_options( &self, id: &str, options: Option<&RequestOptions>, ) -> Result<(), Error>
Variant of Self::delete_factor that accepts per-request crate::RequestOptions.
Sourcepub async fn challenge_factor(
&self,
id: &str,
params: ChallengeFactorParams,
) -> Result<AuthenticationChallenge, Error>
pub async fn challenge_factor( &self, id: &str, params: ChallengeFactorParams, ) -> Result<AuthenticationChallenge, Error>
Challenge Factor
Creates a Challenge for an Authentication Factor.
Sourcepub async fn challenge_factor_with_options(
&self,
id: &str,
params: ChallengeFactorParams,
options: Option<&RequestOptions>,
) -> Result<AuthenticationChallenge, Error>
pub async fn challenge_factor_with_options( &self, id: &str, params: ChallengeFactorParams, options: Option<&RequestOptions>, ) -> Result<AuthenticationChallenge, Error>
Variant of Self::challenge_factor that accepts per-request crate::RequestOptions.
Sourcepub async fn list_user_auth_factors(
&self,
userland_user_id: &str,
params: ListUserAuthFactorsParams,
) -> Result<UserAuthenticationFactorList, Error>
pub async fn list_user_auth_factors( &self, userland_user_id: &str, params: ListUserAuthFactorsParams, ) -> Result<UserAuthenticationFactorList, Error>
List authentication factors
Lists the authentication factors for a user.
Sourcepub async fn list_user_auth_factors_with_options(
&self,
userland_user_id: &str,
params: ListUserAuthFactorsParams,
options: Option<&RequestOptions>,
) -> Result<UserAuthenticationFactorList, Error>
pub async fn list_user_auth_factors_with_options( &self, userland_user_id: &str, params: ListUserAuthFactorsParams, options: Option<&RequestOptions>, ) -> Result<UserAuthenticationFactorList, Error>
Variant of Self::list_user_auth_factors that accepts per-request crate::RequestOptions.
Sourcepub fn list_user_auth_factors_auto_paging(
&self,
userland_user_id: impl Into<String>,
params: ListUserAuthFactorsParams,
) -> impl Stream<Item = Result<AuthenticationFactor, Error>> + '_
pub fn list_user_auth_factors_auto_paging( &self, userland_user_id: impl Into<String>, params: ListUserAuthFactorsParams, ) -> impl Stream<Item = Result<AuthenticationFactor, Error>> + '_
Returns an async futures_util::Stream that yields every AuthenticationFactor
across all pages, advancing the after cursor under the hood.
use futures_util::TryStreamExt;
let all: Vec<AuthenticationFactor> = self
.list_user_auth_factors_auto_paging(userland_user_id, params)
.try_collect()
.await?;Sourcepub async fn create_user_auth_factor(
&self,
userland_user_id: &str,
params: CreateUserAuthFactorParams,
) -> Result<UserAuthenticationFactorEnrollResponse, Error>
pub async fn create_user_auth_factor( &self, userland_user_id: &str, params: CreateUserAuthFactorParams, ) -> Result<UserAuthenticationFactorEnrollResponse, Error>
Enroll an authentication factor
Enrolls a user in a new authentication factor.
Sourcepub async fn create_user_auth_factor_with_options(
&self,
userland_user_id: &str,
params: CreateUserAuthFactorParams,
options: Option<&RequestOptions>,
) -> Result<UserAuthenticationFactorEnrollResponse, Error>
pub async fn create_user_auth_factor_with_options( &self, userland_user_id: &str, params: CreateUserAuthFactorParams, options: Option<&RequestOptions>, ) -> Result<UserAuthenticationFactorEnrollResponse, Error>
Variant of Self::create_user_auth_factor that accepts per-request crate::RequestOptions.