summaryrefslogtreecommitdiffstats
path: root/settings/Controller/AuthSettingsController.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-11-18 15:42:30 +0100
committerGitHub <noreply@github.com>2016-11-18 15:42:30 +0100
commit332eaec4c01356d0b2119d4ec8fe07fa492d031b (patch)
tree3f89772129059801fd6768985aed9f7785a1791c /settings/Controller/AuthSettingsController.php
parentfaee255ff47873ed2f8908c7d6b6e603ded11618 (diff)
parent3ffd9a755f60761d6a1f5fa3d02d07b4c2e68972 (diff)
downloadnextcloud-server-332eaec4c01356d0b2119d4ec8fe07fa492d031b.tar.gz
nextcloud-server-332eaec4c01356d0b2119d4ec8fe07fa492d031b.zip
Merge pull request #1447 from nextcloud/password-confirmation-for-some-actions
Password confirmation for some actions
Diffstat (limited to 'settings/Controller/AuthSettingsController.php')
-rw-r--r--settings/Controller/AuthSettingsController.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/settings/Controller/AuthSettingsController.php b/settings/Controller/AuthSettingsController.php
index 2a4b30dbd76..57192e119a9 100644
--- a/settings/Controller/AuthSettingsController.php
+++ b/settings/Controller/AuthSettingsController.php
@@ -111,7 +111,9 @@ class AuthSettingsController extends Controller {
/**
* @NoAdminRequired
* @NoSubadminRequired
+ * @PasswordConfirmationRequired
*
+ * @param string $name
* @return JSONResponse
*/
public function create($name) {
@@ -138,11 +140,11 @@ class AuthSettingsController extends Controller {
$tokenData = $deviceToken->jsonSerialize();
$tokenData['canDelete'] = true;
- return [
+ return new JSONResponse([
'token' => $token,
'loginName' => $loginName,
- 'deviceToken' => $tokenData
- ];
+ 'deviceToken' => $tokenData,
+ ]);
}
private function getServiceNotAvailableResponse() {