WARNING: Deprecated in 7.15.0.
The Java REST Client is deprecated in favor of the Java API Client.
Enable User API
editEnable User API
editExecution
editEnabling a disabled user can be performed using the security().enableUser()
method:
EnableUserRequest request = new EnableUserRequest("enable_user", RefreshPolicy.NONE); boolean response = client.security().enableUser(request, RequestOptions.DEFAULT);
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: