summaryrefslogtreecommitdiffstats
path: root/apps/federation/lib/Controller
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2016-08-19 21:41:55 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2016-08-28 11:40:58 +0200
commitb6520827f704b304b0df6e0a618f28b96a3e04c7 (patch)
treecbbab31a621d348b1654989bb53b6bab3127f528 /apps/federation/lib/Controller
parent16ff207465335b624e67b9a9d0dae00ef23cd45c (diff)
downloadnextcloud-server-b6520827f704b304b0df6e0a618f28b96a3e04c7.tar.gz
nextcloud-server-b6520827f704b304b0df6e0a618f28b96a3e04c7.zip
Use function parameters
Diffstat (limited to 'apps/federation/lib/Controller')
-rw-r--r--apps/federation/lib/Controller/OCSAuthAPIController.php16
1 files changed, 6 insertions, 10 deletions
diff --git a/apps/federation/lib/Controller/OCSAuthAPIController.php b/apps/federation/lib/Controller/OCSAuthAPIController.php
index 68e0f8b271e..6cd3b1890ef 100644
--- a/apps/federation/lib/Controller/OCSAuthAPIController.php
+++ b/apps/federation/lib/Controller/OCSAuthAPIController.php
@@ -96,14 +96,12 @@ class OCSAuthAPIController extends OCSController{
*
* request received to ask remote server for a shared secret
*
+ * @param string $url
+ * @param string $token
* @return Http\DataResponse
* @throws OCSForbiddenException
*/
- public function requestSharedSecret() {
-
- $url = $this->request->getParam('url');
- $token = $this->request->getParam('token');
-
+ public function requestSharedSecret($url, $token) {
if ($this->trustedServers->isTrustedServer($url) === false) {
$this->logger->error('remote server not trusted (' . $url . ') while requesting shared secret', ['app' => 'federation']);
throw new OCSForbiddenException();
@@ -146,14 +144,12 @@ class OCSAuthAPIController extends OCSController{
*
* create shared secret and return it
*
+ * @param string $url
+ * @param string $token
* @return Http\DataResponse
* @throws OCSForbiddenException
*/
- public function getSharedSecret() {
-
- $url = $this->request->getParam('url');
- $token = $this->request->getParam('token');
-
+ public function getSharedSecret($url, $token) {
if ($this->trustedServers->isTrustedServer($url) === false) {
$this->logger->error('remote server not trusted (' . $url . ') while getting shared secret', ['app' => 'federation']);
throw new OCSForbiddenException();