summaryrefslogtreecommitdiffstats
path: root/settings/Controller/AuthSettingsController.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-09-19 17:13:30 +0200
committerLukas Reschke <lukas@statuscode.ch>2016-11-18 12:10:50 +0100
commit68fa1e5dd8a588d3903dfee4dab5c740637e0cf6 (patch)
treec7c56a938432f0952d92a369685c947aa00ff37b /settings/Controller/AuthSettingsController.php
parent86aa6197b881540b39d8a3c4475ee6b453b71aab (diff)
downloadnextcloud-server-68fa1e5dd8a588d3903dfee4dab5c740637e0cf6.tar.gz
nextcloud-server-68fa1e5dd8a588d3903dfee4dab5c740637e0cf6.zip
Require password confirmation for app password
Signed-off-by: Joas Schilling <coding@schilljs.com>
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 4e3d05a14e8..732f3abd1fd 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() {