def change_password(user_id, new_password, old_password = nil)
    req = {"password" => new_password}
    req["oldPassword"] = old_password if old_password
    json_parse_reply(@key_style, *json_put(@target,
        "#{type_info(:user, :path)}/#{URI.encode(user_id)}/password", req, headers))
  end
def change_password(user_id, new_password, old_password = nil)
    req = {"password" => new_password}
    req["oldPassword"] = old_password if old_password
    json_parse_reply(@key_style, *json_put(@target,
        "#{type_info(:user, :path)}/#{URI.encode(user_id)}/password", req, headers))
  end
Change password.
 * For a user to change their own password, the token in @auth_header must
   contain "password.write" scope and the correct +old_password+ must be given.
 * For an admin to set a user's password, the token in @auth_header must
   contain "uaa.admin" scope.
 @see https://github.com/cloudfoundry/uaa/blob/master/docs/UAA-APIs.rst#change-password-put-useridpassword
 @see https://github.com/cloudfoundry/uaa/blob/master/docs/UAA-Security.md#password-change
 @param [String] user_id the {Scim} +id+ attribute of the user
 @return [Hash] success message from server