summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-09-30 09:58:02 +0200
committerJoas Schilling <coding@schilljs.com>2016-09-30 10:21:08 +0200
commita1e4b17ff44cc4476574b8d335ac3fdf2c2dc561 (patch)
tree04629eb4b3a036b7e2a55a58f1bafd571ec6b50c /build
parent877cb06bfed4524beb62e4cc52f946406ef7d5ea (diff)
downloadnextcloud-server-a1e4b17ff44cc4476574b8d335ac3fdf2c2dc561.tar.gz
nextcloud-server-a1e4b17ff44cc4476574b8d335ac3fdf2c2dc561.zip
Remove unused endpoint
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'build')
-rw-r--r--build/integration/features/bootstrap/Auth.php20
1 files changed, 14 insertions, 6 deletions
diff --git a/build/integration/features/bootstrap/Auth.php b/build/integration/features/bootstrap/Auth.php
index e0eb5393bb8..f4b1a3e5b47 100644
--- a/build/integration/features/bootstrap/Auth.php
+++ b/build/integration/features/bootstrap/Auth.php
@@ -67,13 +67,21 @@ trait Auth {
* @Given a new client token is used
*/
public function aNewClientTokenIsUsed() {
+ $this->loggingInUsingWebAs('user0');
+
+ $fullUrl = substr($this->baseUrl, 0, -5) . '/index.php/settings/personal/authtokens';
$client = new Client();
- $resp = $client->post(substr($this->baseUrl, 0, -5) . '/token/generate', [
- 'json' => [
- 'user' => 'user0',
- 'password' => '123456',
- ]
- ]);
+ $options = [
+ 'auth' => ['user0', '123456'],
+ 'body' => [
+ 'requesttoken' => $this->requestToken,
+ 'name' => md5(microtime()),
+ ],
+ 'cookies' => $this->cookieJar,
+ ];
+
+ $resp = $client->send($client->createRequest('POST', $fullUrl, $options));
+
$this->clientToken = json_decode($resp->getBody()->getContents())->token;
}