getAccountEmbed method

Future<EmbedStatusResp?> getAccountEmbed({
  1. String? app,
})

Reports whether one of this brand's shared embedded apps (cms, erp, help) may be framed by the caller and is actually running, so a console module can choose between the embed and the provision panel.

Reports whether one of this brand's shared embedded apps (cms, erp, help) may be framed by the caller and is actually running, so a console module can choose between the embed and the provision panel. It answers two questions the browser cannot answer for itself. ENTITLEMENT is server-authoritative: each app is a single shared per-BRAND instance, so only a member of the owning brand org — or a SuperAdmin — is given the embed URL; every other caller gets phase "not-entitled" and no URL. REACHABILITY is a probe of that origin, which a cross-origin page cannot read for itself. The probed host is always

Parameters:

  • String app: App is the embedded app to report on: cms (Content Studio), erp or help.

Implementation

Future<EmbedStatusResp?> getAccountEmbed({ String? app, }) async {
  final response = await getAccountEmbedWithHttpInfo( app: app, );
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  }
  // When a remote server returns no body with a status of 204, we shall not decode it.
  // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  // FormatException when trying to decode an empty string.
  if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
    return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'EmbedStatusResp',) as EmbedStatusResp;

  }
  return null;
}