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

    Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent

    org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params
  • Field Summary

    Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent

    EMPTY_PARAMS

    Fields inherited from interface org.elasticsearch.client.Validatable

    EMPTY
  • 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)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject

    isFragment

    Methods inherited from interface org.elasticsearch.client.Validatable

    validate
  • 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 the ChangePasswordRequest 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

      public RefreshPolicy 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 interface org.elasticsearch.common.xcontent.ToXContent
      Throws:
      java.io.IOException