NOTE: You are looking at documentation for an older release. For the latest information, see the current release documentation.
Disable User API
editDisable User API
editExecution
editDisabling a user can be performed using the security().disableUser()
method:
DisableUserRequest request = new DisableUserRequest("disable_user", RefreshPolicy.NONE); boolean response = client.security().disableUser(RequestOptions.DEFAULT, request);
Response
editThe returned Boolean
indicates the request status.
Asynchronous Execution
editThis request can be executed asynchronously:
The asynchronous method does not block and returns immediately. Once the request
has completed the ActionListener
is called back using the onResponse
method
if the execution successfully completed or using the onFailure
method if
it failed.
A typical listener for a Boolean
looks like: