lockUserWithHttpInfo method

Future<Response> lockUserWithHttpInfo(
  1. String userId
)

Lock a user

Marks the given user as locked, which means they are not allowed to sign in again until the lock expires. Lock duration can be configured in the instance's restrictions settings.

Note: This method returns the HTTP Response.

Parameters:

  • String userId (required): The ID of the user to lock

Implementation

Future<http.Response> lockUserWithHttpInfo(
  String userId,
) async {
  // ignore: prefer_const_declarations
  final path = r'/users/{user_id}/lock'.replaceAll('{user_id}', userId);

  // ignore: prefer_final_locals
  Object? postBody;

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

  const contentTypes = <String>[];

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