diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2017-03-13 10:55:08 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2017-04-11 15:04:01 +0200 |
commit | 3bc72f7224b6698c13d66c102e55e65467105c94 (patch) | |
tree | fe419c918bee444d46bf96b70eef16700b73849a /apps/federation | |
parent | e2d7bffcdad5fa7f67728f419bcb27955a5e3c1a (diff) | |
download | nextcloud-server-3bc72f7224b6698c13d66c102e55e65467105c94.tar.gz nextcloud-server-3bc72f7224b6698c13d66c102e55e65467105c94.zip |
give old end-points a seperate name
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'apps/federation')
-rw-r--r-- | apps/federation/appinfo/routes.php | 4 | ||||
-rw-r--r-- | apps/federation/lib/Controller/OCSAuthAPIController.php | 31 |
2 files changed, 33 insertions, 2 deletions
diff --git a/apps/federation/appinfo/routes.php b/apps/federation/appinfo/routes.php index 4c742dd705c..01c37eab584 100644 --- a/apps/federation/appinfo/routes.php +++ b/apps/federation/appinfo/routes.php @@ -45,12 +45,12 @@ $application->registerRoutes( 'ocs' => [ // old endpoints, only used by Nextcloud and ownCloud [ - 'name' => 'OCSAuthAPI#getSharedSecret', + 'name' => 'OCSAuthAPI#getSharedSecretLegacy', 'url' => '/api/v1/shared-secret', 'verb' => 'GET', ], [ - 'name' => 'OCSAuthAPI#requestSharedSecret', + 'name' => 'OCSAuthAPI#requestSharedSecretLegacy', 'url' => '/api/v1/request-shared-secret', 'verb' => 'POST', ], diff --git a/apps/federation/lib/Controller/OCSAuthAPIController.php b/apps/federation/lib/Controller/OCSAuthAPIController.php index 6cd3b1890ef..1176434a4b8 100644 --- a/apps/federation/lib/Controller/OCSAuthAPIController.php +++ b/apps/federation/lib/Controller/OCSAuthAPIController.php @@ -94,6 +94,37 @@ class OCSAuthAPIController extends OCSController{ * @NoCSRFRequired * @PublicPage * + * request received to ask remote server for a shared secret, for legacy end-points + * + * @param string $url + * @param string $token + * @return Http\DataResponse + * @throws OCSForbiddenException + */ + public function requestSharedSecretLegacy($url, $token) { + return $this->requestSharedSecret($url, $token); + } + + + /** + * @NoCSRFRequired + * @PublicPage + * + * create shared secret and return it, for legacy end-points + * + * @param string $url + * @param string $token + * @return Http\DataResponse + * @throws OCSForbiddenException + */ + public function getSharedSecretLegacy($url, $token) { + return $this->getSharedSecret($url, $token); + } + + /** + * @NoCSRFRequired + * @PublicPage + * * request received to ask remote server for a shared secret * * @param string $url |