From da63af8b021afb209308f16611508ea65399f738 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 3 Aug 2016 16:24:12 +0200 Subject: enable deleting/configuring new tokens Signed-off-by: Robin Appelman --- settings/Controller/AuthSettingsController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'settings/Controller') diff --git a/settings/Controller/AuthSettingsController.php b/settings/Controller/AuthSettingsController.php index f097abf910b..4e3d05a14e8 100644 --- a/settings/Controller/AuthSettingsController.php +++ b/settings/Controller/AuthSettingsController.php @@ -135,11 +135,13 @@ class AuthSettingsController extends Controller { $token = $this->generateRandomDeviceToken(); $deviceToken = $this->tokenProvider->generateToken($token, $this->uid, $loginName, $password, $name, IToken::PERMANENT_TOKEN); + $tokenData = $deviceToken->jsonSerialize(); + $tokenData['canDelete'] = true; return [ 'token' => $token, 'loginName' => $loginName, - 'deviceToken' => $deviceToken + 'deviceToken' => $tokenData ]; } -- cgit v1.2.3