RotatingBarcode

JSON representation
{
  "type": enum (BarcodeType),
  "renderEncoding": enum (BarcodeRenderEncoding),
  "valuePattern": string,
  "totpDetails": {
    object (TotpDetails)
  },
  "alternateText": string,
  "showCodeText": {
    object (LocalizedString)
  }
}
Fields
type

enum (BarcodeType)

The type of this barcode.

renderEncoding

enum (BarcodeRenderEncoding)

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

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

object (TotpDetails)

Details used to evaluate the {totp_value_n} substitutions.

alternateText

string

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

object (LocalizedString)

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 (TotpAlgorithm),
  "parameters": [
    {
      object (TotpParameters)
    }
  ]
}
Fields
periodMillis

string (int64 format)

The time interval used for the TOTP value generation, in milliseconds.

algorithm

enum (TotpAlgorithm)

The TOTP algorithm used to generate the OTP.

parameters[]

object (TotpParameters)

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

string

The secret key used for the TOTP value generation, encoded as a Base16 string.

valueLength

integer

The length of the TOTP value in decimal digits.