QRCodeCollector

A collector that handles QR code display in DaVinci authentication flows.

The QRCodeCollector is used to display QR codes to users for authentication scenarios such as:

  • Device pairing

  • Multi-factor authentication setup

  • Out-of-band authentication

  • Cross-device authentication flows

The QR code content is typically provided as a Base64-encoded image string that can be decoded and displayed as a bitmap.

Content Format

The content field typically contains a data URI string with Base64-encoded image data:

data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...

See also

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
lateinit var content: String

The QR code content as a Base64-encoded data URI string.

Link copied to clipboard
lateinit var fallbackText: String

Fallback text to display when the QR code cannot be rendered.

Functions

Link copied to clipboard
fun bitmap(): Bitmap?

Converts the Base64-encoded QR code content to a displayable Bitmap.

Link copied to clipboard
open override fun init(input: JsonObject): QRCodeCollector

Initializes the QRCodeCollector with configuration from the input JSON.