Struct okta::user_factors::UserFactors
source · [−]pub struct UserFactors {
pub client: Client,
}
Fields
client: Client
Implementations
sourceimpl UserFactors
impl UserFactors
sourcepub async fn list_factors(&self, user_id: &str) -> Result<Vec<UserFactor>>
pub async fn list_factors(&self, user_id: &str) -> Result<Vec<UserFactor>>
This function performs a GET
to the /api/v1/users/{userId}/factors
endpoint.
Enumerates all the enrolled factors for the specified user
Parameters:
user_id: &str
sourcepub async fn list_all_factors(&self, user_id: &str) -> Result<Vec<UserFactor>>
pub async fn list_all_factors(&self, user_id: &str) -> Result<Vec<UserFactor>>
This function performs a GET
to the /api/v1/users/{userId}/factors
endpoint.
As opposed to list_factors
, this function returns all the pages of the request at once.
Enumerates all the enrolled factors for the specified user
sourcepub async fn enroll_factor(
&self,
user_id: &str,
update_phone: bool,
template_id: &str,
token_lifetime_seconds: i64,
activate: bool,
body: &UserFactor
) -> Result<UserFactor>
pub async fn enroll_factor(
&self,
user_id: &str,
update_phone: bool,
template_id: &str,
token_lifetime_seconds: i64,
activate: bool,
body: &UserFactor
) -> Result<UserFactor>
Enroll Factor.
This function performs a POST
to the /api/v1/users/{userId}/factors
endpoint.
Enrolls a user with a supported factor.
Parameters:
user_id: &str
update_phone: bool
template_id: &str
– id of SMS template (only for SMS factor).token_lifetime_seconds: i64
activate: bool
sourcepub async fn list_supported_factors(
&self,
user_id: &str
) -> Result<Vec<UserFactor>>
pub async fn list_supported_factors(
&self,
user_id: &str
) -> Result<Vec<UserFactor>>
This function performs a GET
to the /api/v1/users/{userId}/factors/catalog
endpoint.
Enumerates all the supported factors that can be enrolled for the specified user
Parameters:
user_id: &str
sourcepub async fn list_all_supported_factors(
&self,
user_id: &str
) -> Result<Vec<UserFactor>>
pub async fn list_all_supported_factors(
&self,
user_id: &str
) -> Result<Vec<UserFactor>>
This function performs a GET
to the /api/v1/users/{userId}/factors/catalog
endpoint.
As opposed to list_supported_factors
, this function returns all the pages of the request at once.
Enumerates all the supported factors that can be enrolled for the specified user
sourcepub async fn list_supported_security_questions(
&self,
user_id: &str
) -> Result<Vec<SecurityQuestion>>
pub async fn list_supported_security_questions(
&self,
user_id: &str
) -> Result<Vec<SecurityQuestion>>
This function performs a GET
to the /api/v1/users/{userId}/factors/questions
endpoint.
Enumerates all available security questions for a user’s question
factor
Parameters:
user_id: &str
sourcepub async fn list_all_supported_security_questions(
&self,
user_id: &str
) -> Result<Vec<SecurityQuestion>>
pub async fn list_all_supported_security_questions(
&self,
user_id: &str
) -> Result<Vec<SecurityQuestion>>
This function performs a GET
to the /api/v1/users/{userId}/factors/questions
endpoint.
As opposed to list_supported_security_questions
, this function returns all the pages of the request at once.
Enumerates all available security questions for a user’s question
factor
sourcepub async fn get_factor(
&self,
user_id: &str,
factor_id: &str
) -> Result<UserFactor>
pub async fn get_factor(
&self,
user_id: &str,
factor_id: &str
) -> Result<UserFactor>
This function performs a GET
to the /api/v1/users/{userId}/factors/{factorId}
endpoint.
Fetches a factor for the specified user
Parameters:
user_id: &str
factor_id: &str
sourcepub async fn delete_factor(&self, user_id: &str, factor_id: &str) -> Result<()>
pub async fn delete_factor(&self, user_id: &str, factor_id: &str) -> Result<()>
This function performs a DELETE
to the /api/v1/users/{userId}/factors/{factorId}
endpoint.
Unenrolls an existing factor for the specified user, allowing the user to enroll a new factor.
Parameters:
user_id: &str
factor_id: &str
sourcepub async fn activate_factor(
&self,
user_id: &str,
factor_id: &str,
body: &ActivateFactorRequest
) -> Result<UserFactor>
pub async fn activate_factor(
&self,
user_id: &str,
factor_id: &str,
body: &ActivateFactorRequest
) -> Result<UserFactor>
Activate Factor.
This function performs a POST
to the /api/v1/users/{userId}/factors/{factorId}/lifecycle/activate
endpoint.
The sms
and token:software:totp
factor types require activation to complete the enrollment process.
Parameters:
user_id: &str
factor_id: &str
sourcepub async fn get_factor_transaction_status(
&self,
user_id: &str,
factor_id: &str,
transaction_id: &str
) -> Result<VerifyUserFactorResponse>
pub async fn get_factor_transaction_status(
&self,
user_id: &str,
factor_id: &str,
transaction_id: &str
) -> Result<VerifyUserFactorResponse>
This function performs a GET
to the /api/v1/users/{userId}/factors/{factorId}/transactions/{transactionId}
endpoint.
Polls factors verification transaction for status.
Parameters:
user_id: &str
factor_id: &str
transaction_id: &str
sourcepub async fn verify_factor(
&self,
user_id: &str,
factor_id: &str,
template_id: &str,
token_lifetime_seconds: i64,
body: &VerifyFactorRequest
) -> Result<VerifyUserFactorResponse>
pub async fn verify_factor(
&self,
user_id: &str,
factor_id: &str,
template_id: &str,
token_lifetime_seconds: i64,
body: &VerifyFactorRequest
) -> Result<VerifyUserFactorResponse>
Verify MFA Factor.
This function performs a POST
to the /api/v1/users/{userId}/factors/{factorId}/verify
endpoint.
Verifies an OTP for a token
or token:hardware
factor
Parameters:
user_id: &str
factor_id: &str
template_id: &str
token_lifetime_seconds: i64
x_forwarded_for: &str
user_agent: &str
accept_language: &str
Auto Trait Implementations
impl !RefUnwindSafe for UserFactors
impl Send for UserFactors
impl Sync for UserFactors
impl Unpin for UserFactors
impl !UnwindSafe for UserFactors
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> FutureExt for T
impl<T> FutureExt for T
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more