Class ChangePasswordRequest
java.lang.Object
org.elasticsearch.client.security.ChangePasswordRequest
- All Implemented Interfaces:
Validatable,org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentObject
public final class ChangePasswordRequest
extends Object
implements Validatable, org.elasticsearch.xcontent.ToXContentObject
Request object to change the password of a user of a native realm or a built-in user.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.Params -
Field Summary
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMSFields inherited from interface org.elasticsearch.client.Validatable
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionChangePasswordRequest(String username, char[] password, RefreshPolicy refreshPolicy) -
Method Summary
Modifier and TypeMethodDescriptionchar[]org.elasticsearch.xcontent.XContentBuildertoXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragmentMethods inherited from interface org.elasticsearch.client.Validatable
validate
-
Constructor Details
-
ChangePasswordRequest
public ChangePasswordRequest(@Nullable 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 theChangePasswordRequestobject so the calling code must clear it after receiving the response.refreshPolicy- The refresh policy for the request.
-
-
Method Details
-
getUsername
-
getPassword
public char[] getPassword() -
getRefreshPolicy
-
toXContent
public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceorg.elasticsearch.xcontent.ToXContent- Throws:
IOException
-