toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  final accountManagementActionsSupported =
      this.accountManagementActionsSupported;
  final accountManagementUri = this.accountManagementUri;
  final deviceAuthorizationEndpoint = this.deviceAuthorizationEndpoint;
  final promptValuesSupported = this.promptValuesSupported;
  return {
    if (accountManagementActionsSupported != null)
      'account_management_actions_supported':
          accountManagementActionsSupported.map((v) => v.name).toList(),
    if (accountManagementUri != null)
      'account_management_uri': accountManagementUri.toString(),
    'authorization_endpoint': authorizationEndpoint.toString(),
    'code_challenge_methods_supported': codeChallengeMethodsSupported
        .map((v) => v)
        .toList(),
    if (deviceAuthorizationEndpoint != null)
      'device_authorization_endpoint': deviceAuthorizationEndpoint.toString(),
    'grant_types_supported': grantTypesSupported.map((v) => v).toList(),
    'issuer': issuer.toString(),
    if (promptValuesSupported != null)
      'prompt_values_supported': promptValuesSupported.map((v) => v).toList(),
    'registration_endpoint': registrationEndpoint.toString(),
    'response_modes_supported': responseModesSupported.map((v) => v).toList(),
    'response_types_supported': responseTypesSupported.map((v) => v).toList(),
    'revocation_endpoint': revocationEndpoint.toString(),
    'token_endpoint': tokenEndpoint.toString(),
  };
}