Browse Source
give old end-points a seperate name
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
pull/3614/head
Bjoern Schiessle
9 years ago
committed by
Roeland Jago Douma
No known key found for this signature in database
GPG Key ID: F941078878347C0C
2 changed files with
33 additions and
2 deletions
-
apps/federation/appinfo/routes.php
-
apps/federation/lib/Controller/OCSAuthAPIController.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', |
|
|
|
], |
|
|
|
|
|
|
|
@ -90,6 +90,37 @@ class OCSAuthAPIController extends OCSController{ |
|
|
|
$this->logger = $logger; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @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 |
|
|
|
|