TotpMultiFactorGenerator
class TotpMultiFactorGenerator
Helper class used to generate a TotpMultiFactorAssertion.
Summary
Public functions |
|
|---|---|
java-static Task<TotpSecret!> |
generateSecret(session: MultiFactorSession)Creates a TOTP secret as part of enrolling a TOTP (time-based one-time password) second factor. |
java-static TotpMultiFactorAssertion |
getAssertionForEnrollment(secret: TotpSecret, otp: String)Creates an assertion for completing the enrollment flow. |
java-static TotpMultiFactorAssertion |
getAssertionForSignIn(enrollmentId: String, otp: String)Creates an assertion for the sign-in flow. |
Public functions
generateSecret
java-static fun generateSecret(session: MultiFactorSession): Task<TotpSecret!>
Creates a TOTP secret as part of enrolling a TOTP (time-based one-time password) second factor. This method uses the auth instance corresponding to the user in the MultiFactorSession.
| Parameters | |
|---|---|
session: MultiFactorSession |
getAssertionForEnrollment
java-static fun getAssertionForEnrollment(secret: TotpSecret, otp: String): TotpMultiFactorAssertion
Creates an assertion for completing the enrollment flow.
| Parameters | |
|---|---|
secret: TotpSecret |
obtained from the |
otp: String |
one-time password obtained from the TOTP App. |
getAssertionForSignIn
java-static fun getAssertionForSignIn(enrollmentId: String, otp: String): TotpMultiFactorAssertion
Creates an assertion for the sign-in flow.