diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-03-01 14:09:54 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-03-01 21:24:44 +0100 |
commit | 102f700d96556424e4b59fcc9fadd65c1a377225 (patch) | |
tree | bdd172ea009b5869960a78145d0d49489cae899f /settings/Controller | |
parent | 2398d1183e7e561c8d3db7c06d8919d09c26b9e8 (diff) | |
download | nextcloud-server-102f700d96556424e4b59fcc9fadd65c1a377225.tar.gz nextcloud-server-102f700d96556424e4b59fcc9fadd65c1a377225.zip |
Load auth tokens with the initial state API
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'settings/Controller')
-rw-r--r-- | settings/Controller/AuthSettingsController.php | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/settings/Controller/AuthSettingsController.php b/settings/Controller/AuthSettingsController.php index 71bd3bf53d8..0afc37e7cc3 100644 --- a/settings/Controller/AuthSettingsController.php +++ b/settings/Controller/AuthSettingsController.php @@ -95,39 +95,6 @@ class AuthSettingsController extends Controller { /** * @NoAdminRequired * @NoSubadminRequired - * - * @return JSONResponse|array - */ - public function index() { - $tokens = $this->tokenProvider->getTokenByUser($this->uid); - - try { - $sessionId = $this->session->getId(); - } catch (SessionNotAvailableException $ex) { - return $this->getServiceNotAvailableResponse(); - } - try { - $sessionToken = $this->tokenProvider->getToken($sessionId); - } catch (InvalidTokenException $ex) { - return $this->getServiceNotAvailableResponse(); - } - - return array_map(function (IToken $token) use ($sessionToken) { - $data = $token->jsonSerialize(); - $data['canDelete'] = true; - $data['canRename'] = $token instanceof INamedToken; - if ($sessionToken->getId() === $token->getId()) { - $data['canDelete'] = false; - $data['canRename'] = false; - $data['current'] = true; - } - return $data; - }, $tokens); - } - - /** - * @NoAdminRequired - * @NoSubadminRequired * @PasswordConfirmationRequired * * @param string $name |