CloudAccountLinkingWebBroker

object CloudAccountLinkingWebBroker


WebBroker helper for CICTOCAL (Cloud-Initiated Cloud-to-Cloud Account Linking) flow.

Summary

Public functions

String
buildLinkUrl(
    agentId: String,
    structureId: String,
    email: String,
    baseUrl: String
)

Constructs the WebBroker URL for launching the OS browser container (Chrome Custom Tabs).

CloudAccountLinkingWebBroker.Result

Parses the redirect deep-link (e.g. ghp-sdk://link-complete?status=...

Constants

const val DEFAULT_LINK_BASE_URLString

SDK_REDIRECT_HOST

const val SDK_REDIRECT_HOSTString

SDK_REDIRECT_SCHEME

const val SDK_REDIRECT_SCHEMEString

Public functions

buildLinkUrl

fun buildLinkUrl(
    agentId: String,
    structureId: String,
    email: String,
    baseUrl: String = DEFAULT_LINK_BASE_URL
): String

Constructs the WebBroker URL for launching the OS browser container (Chrome Custom Tabs).

Parameters
agentId: String

The identifier of the 3P agent/partner to link.

structureId: String

The target structure ID for Nest IAM clearance check.

email: String

The active user's Google email for Gaia session validation & AccountChooser.

baseUrl: String = DEFAULT_LINK_BASE_URL

Base WebBroker URL. Defaults to DEFAULT_LINK_BASE_URL.

Returns
String

The complete WebBroker URL with query parameters.

parseDeepLinkResult

fun parseDeepLinkResult(deepLinkUri: String): CloudAccountLinkingWebBroker.Result

Parses the redirect deep-link (e.g. ghp-sdk://link-complete?status=...).

Gracefully handles early failures where status=FAILURE without a session_handle.

Parameters
deepLinkUri: String

The deep-link URI string received from the browser container.

Returns
CloudAccountLinkingWebBroker.Result

Result.Success if status is SUCCESS with a valid sessionHandle, Result.Failure otherwise.