Class ChangePasswordRequest
java.lang.Object
org.elasticsearch.client.security.ChangePasswordRequest
- All Implemented Interfaces:
Validatable
,org.elasticsearch.common.xcontent.ToXContent
,org.elasticsearch.common.xcontent.ToXContentObject
public final class ChangePasswordRequest extends java.lang.Object implements Validatable, org.elasticsearch.common.xcontent.ToXContentObject
Request object to change the password of a user of a native realm or a built-in user.
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ChangePasswordRequest(java.lang.String username, char[] password, RefreshPolicy refreshPolicy)
-
Method Summary
Modifier and Type Method Description char[]
getPassword()
RefreshPolicy
getRefreshPolicy()
java.lang.String
getUsername()
org.elasticsearch.common.xcontent.XContentBuilder
toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
-
Constructor Details
-
ChangePasswordRequest
public ChangePasswordRequest(@Nullable java.lang.String username, char[] password, RefreshPolicy refreshPolicy)- Parameters:
username
- The username of the user whose password should be changed or null for the current user.password
- The new password. The password array is not cleared by theChangePasswordRequest
object so the calling code must clear it after receiving the response.refreshPolicy
- The refresh policy for the request.
-
-
Method Details
-
getUsername
public java.lang.String getUsername() -
getPassword
public char[] getPassword() -
getRefreshPolicy
-
toXContent
public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws java.io.IOException- Specified by:
toXContent
in interfaceorg.elasticsearch.common.xcontent.ToXContent
- Throws:
java.io.IOException
-