JSON representation |
---|
{ "type": enum ( |
Fields | |
---|---|
type |
The type of this barcode. |
renderEncoding |
The render encoding for the barcode. When specified, barcode is rendered in the given encoding. Otherwise best known encoding is chosen by Google. |
valuePattern |
String encoded barcode value. This string supports the following substitutions: * {totp_value_n}: Replaced with the TOTP value (see TotpDetails.parameters). * {totp_timestamp_millis}: Replaced with the timestamp (millis since epoch) at which the barcode was generated. * {totp_timestamp_seconds}: Replaced with the timestamp (seconds since epoch) at which the barcode was generated. |
totpDetails |
Details used to evaluate the {totp_value_n} substitutions. |
alternateText |
An optional text that will override the default text that shows under the barcode. This field is intended for a human readable equivalent of the barcode value, used when the barcode cannot be scanned. |
showCodeText |
Optional text that will be shown when the barcode is hidden behind a click action. This happens in cases where a pass has Smart Tap enabled. If not specified, a default is chosen by Google. |
TotpDetails
Configuration for the time-based OTP substitutions. See https://tools.ietf.org/html/rfc6238
JSON representation |
---|
{ "periodMillis": string, "algorithm": enum ( |
Fields | |
---|---|
periodMillis |
The time interval used for the TOTP value generation, in milliseconds. |
algorithm |
The TOTP algorithm used to generate the OTP. |
parameters[] |
The TOTP parameters for each of the {totp_value_*} substitutions. The TotpParameters at index n is used for the {totp_value_n} substitution. |
TotpAlgorithm
Enums | |
---|---|
TOTP_ALGORITHM_UNSPECIFIED |
|
TOTP_SHA1 |
TOTP algorithm from RFC 6238 with the SHA1 hash function |
TotpParameters
JSON representation |
---|
{ "key": string, "valueLength": integer } |
Fields | |
---|---|
key |
The secret key used for the TOTP value generation, encoded as a Base16 string. |
valueLength |
The length of the TOTP value in decimal digits. |