Class TotpEnrollmentOptions.Builder
java.lang.Object
com.revetsec.totp.TotpEnrollmentOptions.Builder
- Enclosing class:
TotpEnrollmentOptions
@NotThreadSafe
@CheckReturnValue
public static final class TotpEnrollmentOptions.Builder
extends Object
One caller-thread enrollment builder.
- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionaccountName(@Nullable String accountName) Sets the display name shown by the authenticator application.build()Builds immutable options; an account display name is required.replacingFactorId(@Nullable String factorId) Approves replacement of an exact current factor generation.toString()Redacts builder contents.
-
Method Details
-
accountName
Sets the display name shown by the authenticator application.- Parameters:
accountName- display name of at most 256 code points, without colons, ISO controls, Unicode format/line/paragraph controls or leading/trailing whitespace; null clears this required setting. Enrollment also requires the full percent-encoded URI to fit 512 ASCII bytes- Returns:
- this builder
- Since:
- 1.0.0
-
replacingFactorId
Approves replacement of an exact current factor generation. Starting replacement preserves the active factor until confirmation commits.- Parameters:
factorId- current factor generation, or null for initial enrollment- Returns:
- this builder
- Since:
- 1.0.0
-
build
Builds immutable options; an account display name is required.- Returns:
- enrollment options
- Since:
- 1.0.0
-
toString
-