def change_secret(client_id, new_secret, old_secret = nil)
    req = {"secret" => new_secret }
    req["oldSecret"] = old_secret if old_secret
    json_parse_reply(@key_style, *json_put(@target,
        "#{type_info(:client, :path)}/#{URI.encode(client_id)}/secret", req, headers))
  end
def change_secret(client_id, new_secret, old_secret = nil)
    req = {"secret" => new_secret }
    req["oldSecret"] = old_secret if old_secret
    json_parse_reply(@key_style, *json_put(@target,
        "#{type_info(:client, :path)}/#{URI.encode(client_id)}/secret", req, headers))
  end
Change client secret.
 * For a client to change its own secret, the token in @auth_header must contain
   "client.secret" scope and the correct +old_secret+ must be given.
 * For an admin to set a client secret, the token in @auth_header must contain
   "uaa.admin" scope.
 @see https://github.com/cloudfoundry/uaa/blob/master/docs/UAA-APIs.rst#change-client-secret-put-oauthclientsclient_idsecret
 @see https://github.com/cloudfoundry/uaa/blob/master/docs/UAA-Security.md#client-secret-mangagement
 @param [String] client_id the {Scim} +id+ attribute of the client
 @return [Hash] success message from server