getMembershipDataForCurrentUser static method
Returns a list of accounts associated with signed in user. This is useful for OAuth implementations that do not give you access to the token response.
Implementation
static Future<UserMembershipDataResponse> getMembershipDataForCurrentUser (
HttpClient client,
) async {
final Map<String, dynamic> params = Map<String, dynamic>();
final HttpClientConfig config = HttpClientConfig('GET', '/User/GetMembershipsForCurrentUser/', params);
config.bodyContentType = null;
final HttpResponse response = await client.request(config);
if(response.statusCode == 200) {
return UserMembershipDataResponse.asyncFromJson(response.mappedBody);
}
throw Exception(response.mappedBody);
}