diff options
Diffstat (limited to 'core/Controller/OCSController.php')
-rw-r--r-- | core/Controller/OCSController.php | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/core/Controller/OCSController.php b/core/Controller/OCSController.php index 036cdfc2d60..64234a65634 100644 --- a/core/Controller/OCSController.php +++ b/core/Controller/OCSController.php @@ -8,6 +8,7 @@ * @author Julius Härtl <jus@bitgrid.net> * @author Lukas Reschke <lukas@statuscode.ch> * @author Roeland Jago Douma <roeland@famdouma.nl> + * @author Kate Döen <kate.doeen@nextcloud.com> * * @license GNU AGPL version 3 or any later version * @@ -29,6 +30,8 @@ namespace OC\Core\Controller; use OC\CapabilitiesManager; use OC\Security\IdentityProof\Manager; +use OCP\AppFramework\Http; +use OCP\AppFramework\Http\Attribute\IgnoreOpenAPI; use OCP\AppFramework\Http\DataResponse; use OCP\IRequest; use OCP\IUserManager; @@ -49,6 +52,7 @@ class OCSController extends \OCP\AppFramework\OCSController { /** * @PublicPage */ + #[IgnoreOpenAPI] public function getConfig(): DataResponse { $data = [ 'version' => '1.7', @@ -63,14 +67,18 @@ class OCSController extends \OCP\AppFramework\OCSController { /** * @PublicPage + * + * Get the capabilities + * + * @return DataResponse<Http::STATUS_OK, array{version: array{major: int, minor: int, micro: int, string: string, edition: '', extendedSupport: bool}, capabilities: array<string, mixed>}, array{}> */ public function getCapabilities(): DataResponse { $result = []; [$major, $minor, $micro] = \OCP\Util::getVersion(); $result['version'] = [ - 'major' => $major, - 'minor' => $minor, - 'micro' => $micro, + 'major' => (int)$major, + 'minor' => (int)$minor, + 'micro' => (int)$micro, 'string' => \OC_Util::getVersionString(), 'edition' => '', 'extendedSupport' => \OCP\Util::hasExtendedSupport() @@ -91,6 +99,7 @@ class OCSController extends \OCP\AppFramework\OCSController { * @PublicPage * @BruteForceProtection(action=login) */ + #[IgnoreOpenAPI] public function personCheck(string $login = '', string $password = ''): DataResponse { if ($login !== '' && $password !== '') { if ($this->userManager->checkPassword($login, $password)) { @@ -111,6 +120,7 @@ class OCSController extends \OCP\AppFramework\OCSController { /** * @PublicPage */ + #[IgnoreOpenAPI] public function getIdentityProof(string $cloudId): DataResponse { $userObject = $this->userManager->get($cloudId); |