Class TotpUri
java.lang.Object
com.irurueta.authserver.authorization.domain.totp.TotpUri
Builds the
otpauth:// URI that authenticator applications read from a QR code to enrol a secret.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
TotpUri
private TotpUri()Not instantiable: a holder of static helpers.
-
-
Method Details
-
build
Builds the URI of a TOTP enrolment.- Parameters:
issuer- name of the service, shown by the authenticator.account- name of the account, shown by the authenticator.secret- the shared secret.- Returns:
- the URI, with the parameters of
TotpAlgorithm. - Throws:
IllegalArgumentException- if the issuer or the account is blank.
-
encode
Percent-encodes a value, with spaces as%20as a URI path requires.- Parameters:
value- the value to encode.- Returns:
- the encoded value.
-