mirror of
https://github.com/nextcloud/server.git
synced 2026-04-24 23:59:27 -04:00
Merge pull request #51622 from nextcloud/fix/ocm-public-key-is-optional
fix(ocm): `publicKey` can be disabled so capabilities do not match
This commit is contained in:
commit
519ceee5ab
4 changed files with 4 additions and 5 deletions
|
|
@ -38,7 +38,7 @@ class Capabilities implements ICapability {
|
|||
* apiVersion: '1.0-proposal1',
|
||||
* enabled: bool,
|
||||
* endPoint: string,
|
||||
* publicKey: array{
|
||||
* publicKey?: array{
|
||||
* keyId: string,
|
||||
* publicKeyPem: string,
|
||||
* },
|
||||
|
|
|
|||
|
|
@ -46,7 +46,6 @@
|
|||
"apiVersion",
|
||||
"enabled",
|
||||
"endPoint",
|
||||
"publicKey",
|
||||
"resourceTypes",
|
||||
"version"
|
||||
],
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ class OCMProvider implements IOCMProvider {
|
|||
* enabled: bool,
|
||||
* apiVersion: '1.0-proposal1',
|
||||
* endPoint: string,
|
||||
* publicKey: array{
|
||||
* publicKey?: array{
|
||||
* keyId: string,
|
||||
* publicKeyPem: string
|
||||
* },
|
||||
|
|
@ -236,7 +236,7 @@ class OCMProvider implements IOCMProvider {
|
|||
'apiVersion' => '1.0-proposal1', // deprecated, but keep it to stay compatible with old version
|
||||
'version' => $this->getApiVersion(), // informative but real version
|
||||
'endPoint' => $this->getEndPoint(),
|
||||
'publicKey' => $this->getSignatory()->jsonSerialize(),
|
||||
'publicKey' => $this->getSignatory()?->jsonSerialize(),
|
||||
'resourceTypes' => $resourceTypes
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ interface IOCMProvider extends JsonSerializable {
|
|||
* enabled: bool,
|
||||
* apiVersion: '1.0-proposal1',
|
||||
* endPoint: string,
|
||||
* publicKey: array{
|
||||
* publicKey?: array{
|
||||
* keyId: string,
|
||||
* publicKeyPem: string
|
||||
* },
|
||||
|
|
|
|||
Loading…
Reference in a new issue