diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2016-08-22 19:37:36 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2016-08-22 19:37:36 +0300 |
commit | ad836606b307b8dd769398fdf086ef978a24c61c (patch) | |
tree | 002c233c8ce80ebe8edf69a93bea08de186d17ac /lib | |
parent | 660b15d88c14bed02438453b95ec1bdfe68ce1f6 (diff) |
switch to more common naming scheme for the TOTP label and its issuer
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Controller/SettingsController.php | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/lib/Controller/SettingsController.php b/lib/Controller/SettingsController.php index 2951687..253f802 100644 --- a/lib/Controller/SettingsController.php +++ b/lib/Controller/SettingsController.php @@ -41,23 +41,18 @@ class SettingsController extends Controller { /** @var Defaults */ private $defaults; - /** @var IURLGenerator */ - private $urlGenerator; - /** * @param string $appName * @param IRequest $request * @param IUserSession $userSession * @param ITotp $totp * @param Defaults $defaults - * @param IURLGenerator $urlGenerator */ - public function __construct($appName, IRequest $request, IUserSession $userSession, ITotp $totp, Defaults $defaults, IURLGenerator $urlGenerator) { + public function __construct($appName, IRequest $request, IUserSession $userSession, ITotp $totp, Defaults $defaults) { parent::__construct($appName, $request); $this->userSession = $userSession; $this->totp = $totp; $this->defaults = $defaults; - $this->urlGenerator = $urlGenerator; } /** @@ -100,15 +95,24 @@ class SettingsController extends Controller { ]; } + /** + * The user's cloud id, e.g. "christina@university.domain/owncloud" + * + * @return string + */ private function getSecretName() { $userName = $this->userSession->getUser()->getCloudId(); return rawurlencode($userName); } + /** + * The issuer, e.g. "Nextcloud" or "ownCloud" + * + * @return string + */ private function getSecretIssuer() { $productName = $this->defaults->getName(); - $url = $this->urlGenerator->getAbsoluteURL('/'); - return rawurlencode("$url ($productName)"); + return rawurlencode($productName); } } |