toJson method

Map toJson()

Returns a JSON representation.

Implementation

Map toJson() {
  List<Map> authoritiesMap =
      this.authorities.map((authority) => authority.toJson()).toList();
  return {
    "client_id": clientId,
    "redirect_uri": redirectURI,
    "authorities": authoritiesMap,
    "cache_location": cacheLocation != null ? cacheLocation : null,
    "interaction_mode": interactionMode != null ? interactionMode : null,
    "account_mode": accountMode != null ? accountMode : null,
    "broker_redirect_uri_registered": brokerRedirectUriRegistered != null
        ? brokerRedirectUriRegistered
        : null,
    "default_scopes": defaultScopes != null ? defaultScopes : null
  };
}