revokeSessionWithHttpInfo method

Future<Response> revokeSessionWithHttpInfo(
  1. String userId,
  2. MmRevokeSessionRequest mmRevokeSessionRequest
)

Revoke a user session

Revokes a user session from the provided user id and session id strings. ##### Permissions Must be logged in as the user being updated or have the edit_other_users permission.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> revokeSessionWithHttpInfo(
  String userId,
  MmRevokeSessionRequest mmRevokeSessionRequest,
) async {
  // ignore: prefer_const_declarations
  final path = r'/users/{user_id}/sessions/revoke'.replaceAll('{user_id}', userId);

  // ignore: prefer_final_locals
  Object? postBody = mmRevokeSessionRequest;

  final queryParams = <MmQueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>['application/json'];

  return apiClient.invokeAPI(
    path,
    'POST',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}