getConfiguration method

B2CConfiguration? getConfiguration()

Get the provider configuration (i.e. a compact representation, NOT the full MSAL configuration).

Returns a B2CConfiguration object or null if the provider is not configured yet.

Implementation

B2CConfiguration? getConfiguration() {
  var authorities = <B2CAuthority>[
    B2CAuthority(_configuration!.auth!.authority!, "B2C", true)
  ];
  for (var authority in _configuration!.auth!.knownAuthorities!) {
    //do not replicate default authority
    if (authorities[0].authorityURL != authority) {
      authorities.add(B2CAuthority(authority, "B2C", false));
    }
  }

  return B2CConfiguration(_configuration!.auth!.clientId!,
      _configuration!.auth!.redirectUri!, authorities,
      cacheLocation:
          _configuration!.cache!.cacheLocation.toString().split(".")[1],
      interactionMode: _interactionMode.toString().split(".")[1],
      defaultScopes: _defaultScopes);
}