Skip to content

Commit

Permalink
fix(ocm): move API to NCU
Browse files Browse the repository at this point in the history
Signed-off-by: Maxence Lange <[email protected]>
  • Loading branch information
ArtificialOwl committed Nov 12, 2024
1 parent 4d9f9f9 commit 6a8d615
Show file tree
Hide file tree
Showing 40 changed files with 269 additions and 251 deletions.
8 changes: 4 additions & 4 deletions apps/cloud_federation_api/lib/Capabilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
*/
namespace OCA\CloudFederationAPI;

use NCU\Security\PublicPrivateKeyPairs\Exceptions\KeyPairException;
use NCU\Security\Signature\Exceptions\SignatoryException;
use OC\OCM\OCMSignatoryManager;
use OCP\Capabilities\ICapability;
use OCP\IAppConfig;
use OCP\IURLGenerator;
use OCP\OCM\Exceptions\OCMArgumentException;
use OCP\OCM\IOCMProvider;
use OCP\Security\PublicPrivateKeyPairs\Exceptions\KeyPairException;
use OCP\Security\Signature\Exceptions\SignatoryException;
use Psr\Log\LoggerInterface;

class Capabilities implements ICapability {
Expand All @@ -42,11 +42,11 @@ public function __construct(
* keyId: string,
* publicKeyPem: string,
* },
* resourceTypes: array{
* resourceTypes: list<array{
* name: string,
* shareTypes: list<string>,
* protocols: array<string, string>
* }[],
* }>,
* version: string
* }
* }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
*/
namespace OCA\CloudFederationAPI\Controller;

use NCU\Security\Signature\Exceptions\IncomingRequestException;
use NCU\Security\Signature\Exceptions\SignatoryNotFoundException;
use NCU\Security\Signature\Exceptions\SignatureException;
use NCU\Security\Signature\Exceptions\SignatureNotFoundException;
use NCU\Security\Signature\ISignatureManager;
use NCU\Security\Signature\Model\IIncomingSignedRequest;
use OC\OCM\OCMSignatoryManager;
use OCA\CloudFederationAPI\Config;
use OCA\CloudFederationAPI\ResponseDefinitions;
Expand All @@ -28,12 +34,6 @@
use OCP\IRequest;
use OCP\IURLGenerator;
use OCP\IUserManager;
use OCP\Security\Signature\Exceptions\IncomingRequestException;
use OCP\Security\Signature\Exceptions\SignatoryNotFoundException;
use OCP\Security\Signature\Exceptions\SignatureException;
use OCP\Security\Signature\Exceptions\SignatureNotFoundException;
use OCP\Security\Signature\ISignatureManager;
use OCP\Security\Signature\Model\IIncomingSignedRequest;
use OCP\Share\Exceptions\ShareNotFound;
use OCP\Share\IProviderFactory;
use OCP\Share\IShare;
Expand Down
48 changes: 24 additions & 24 deletions lib/composer/composer/autoload_classmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,30 @@

return array(
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
'NCU\\Security\\PublicPrivateKeyPairs\\Exceptions\\KeyPairConflictException' => $baseDir . '/lib/unstable/Security/PublicPrivateKeyPairs/Exceptions/KeyPairConflictException.php',
'NCU\\Security\\PublicPrivateKeyPairs\\Exceptions\\KeyPairException' => $baseDir . '/lib/unstable/Security/PublicPrivateKeyPairs/Exceptions/KeyPairException.php',
'NCU\\Security\\PublicPrivateKeyPairs\\Exceptions\\KeyPairNotFoundException' => $baseDir . '/lib/unstable/Security/PublicPrivateKeyPairs/Exceptions/KeyPairNotFoundException.php',
'NCU\\Security\\PublicPrivateKeyPairs\\IKeyPairManager' => $baseDir . '/lib/unstable/Security/PublicPrivateKeyPairs/IKeyPairManager.php',
'NCU\\Security\\PublicPrivateKeyPairs\\Model\\IKeyPair' => $baseDir . '/lib/unstable/Security/PublicPrivateKeyPairs/Model/IKeyPair.php',
'NCU\\Security\\Signature\\Exceptions\\IncomingRequestException' => $baseDir . '/lib/unstable/Security/Signature/Exceptions/IncomingRequestException.php',
'NCU\\Security\\Signature\\Exceptions\\IncomingRequestNotFoundException' => $baseDir . '/lib/unstable/Security/Signature/Exceptions/IncomingRequestNotFoundException.php',
'NCU\\Security\\Signature\\Exceptions\\InvalidKeyOriginException' => $baseDir . '/lib/unstable/Security/Signature/Exceptions/InvalidKeyOriginException.php',
'NCU\\Security\\Signature\\Exceptions\\InvalidSignatureException' => $baseDir . '/lib/unstable/Security/Signature/Exceptions/InvalidSignatureException.php',
'NCU\\Security\\Signature\\Exceptions\\SignatoryConflictException' => $baseDir . '/lib/unstable/Security/Signature/Exceptions/SignatoryConflictException.php',
'NCU\\Security\\Signature\\Exceptions\\SignatoryException' => $baseDir . '/lib/unstable/Security/Signature/Exceptions/SignatoryException.php',
'NCU\\Security\\Signature\\Exceptions\\SignatoryNotFoundException' => $baseDir . '/lib/unstable/Security/Signature/Exceptions/SignatoryNotFoundException.php',
'NCU\\Security\\Signature\\Exceptions\\SignatureException' => $baseDir . '/lib/unstable/Security/Signature/Exceptions/SignatureException.php',
'NCU\\Security\\Signature\\Exceptions\\SignatureIdentityNotFoundException' => $baseDir . '/lib/unstable/Security/Signature/Exceptions/SignatureIdentityNotFoundException.php',
'NCU\\Security\\Signature\\Exceptions\\SignatureNotFoundException' => $baseDir . '/lib/unstable/Security/Signature/Exceptions/SignatureNotFoundException.php',
'NCU\\Security\\Signature\\ISignatoryManager' => $baseDir . '/lib/unstable/Security/Signature/ISignatoryManager.php',
'NCU\\Security\\Signature\\ISignatureManager' => $baseDir . '/lib/unstable/Security/Signature/ISignatureManager.php',
'NCU\\Security\\Signature\\Model\\IIncomingSignedRequest' => $baseDir . '/lib/unstable/Security/Signature/Model/IIncomingSignedRequest.php',
'NCU\\Security\\Signature\\Model\\IOutgoingSignedRequest' => $baseDir . '/lib/unstable/Security/Signature/Model/IOutgoingSignedRequest.php',
'NCU\\Security\\Signature\\Model\\ISignatory' => $baseDir . '/lib/unstable/Security/Signature/Model/ISignatory.php',
'NCU\\Security\\Signature\\Model\\ISignedRequest' => $baseDir . '/lib/unstable/Security/Signature/Model/ISignedRequest.php',
'NCU\\Security\\Signature\\Model\\SignatoryStatus' => $baseDir . '/lib/unstable/Security/Signature/Model/SignatoryStatus.php',
'NCU\\Security\\Signature\\Model\\SignatoryType' => $baseDir . '/lib/unstable/Security/Signature/Model/SignatoryType.php',
'NCU\\Security\\Signature\\SignatureAlgorithm' => $baseDir . '/lib/unstable/Security/Signature/SignatureAlgorithm.php',
'OCP\\Accounts\\IAccount' => $baseDir . '/lib/public/Accounts/IAccount.php',
'OCP\\Accounts\\IAccountManager' => $baseDir . '/lib/public/Accounts/IAccountManager.php',
'OCP\\Accounts\\IAccountProperty' => $baseDir . '/lib/public/Accounts/IAccountProperty.php',
Expand Down Expand Up @@ -687,32 +711,8 @@
'OCP\\Security\\Ip\\IRange' => $baseDir . '/lib/public/Security/Ip/IRange.php',
'OCP\\Security\\Ip\\IRemoteAddress' => $baseDir . '/lib/public/Security/Ip/IRemoteAddress.php',
'OCP\\Security\\PasswordContext' => $baseDir . '/lib/public/Security/PasswordContext.php',
'OCP\\Security\\PublicPrivateKeyPairs\\Exceptions\\KeyPairConflictException' => $baseDir . '/lib/public/Security/PublicPrivateKeyPairs/Exceptions/KeyPairConflictException.php',
'OCP\\Security\\PublicPrivateKeyPairs\\Exceptions\\KeyPairException' => $baseDir . '/lib/public/Security/PublicPrivateKeyPairs/Exceptions/KeyPairException.php',
'OCP\\Security\\PublicPrivateKeyPairs\\Exceptions\\KeyPairNotFoundException' => $baseDir . '/lib/public/Security/PublicPrivateKeyPairs/Exceptions/KeyPairNotFoundException.php',
'OCP\\Security\\PublicPrivateKeyPairs\\IKeyPairManager' => $baseDir . '/lib/public/Security/PublicPrivateKeyPairs/IKeyPairManager.php',
'OCP\\Security\\PublicPrivateKeyPairs\\Model\\IKeyPair' => $baseDir . '/lib/public/Security/PublicPrivateKeyPairs/Model/IKeyPair.php',
'OCP\\Security\\RateLimiting\\ILimiter' => $baseDir . '/lib/public/Security/RateLimiting/ILimiter.php',
'OCP\\Security\\RateLimiting\\IRateLimitExceededException' => $baseDir . '/lib/public/Security/RateLimiting/IRateLimitExceededException.php',
'OCP\\Security\\Signature\\Exceptions\\IncomingRequestException' => $baseDir . '/lib/public/Security/Signature/Exceptions/IncomingRequestException.php',
'OCP\\Security\\Signature\\Exceptions\\IncomingRequestNotFoundException' => $baseDir . '/lib/public/Security/Signature/Exceptions/IncomingRequestNotFoundException.php',
'OCP\\Security\\Signature\\Exceptions\\InvalidKeyOriginException' => $baseDir . '/lib/public/Security/Signature/Exceptions/InvalidKeyOriginException.php',
'OCP\\Security\\Signature\\Exceptions\\InvalidSignatureException' => $baseDir . '/lib/public/Security/Signature/Exceptions/InvalidSignatureException.php',
'OCP\\Security\\Signature\\Exceptions\\SignatoryConflictException' => $baseDir . '/lib/public/Security/Signature/Exceptions/SignatoryConflictException.php',
'OCP\\Security\\Signature\\Exceptions\\SignatoryException' => $baseDir . '/lib/public/Security/Signature/Exceptions/SignatoryException.php',
'OCP\\Security\\Signature\\Exceptions\\SignatoryNotFoundException' => $baseDir . '/lib/public/Security/Signature/Exceptions/SignatoryNotFoundException.php',
'OCP\\Security\\Signature\\Exceptions\\SignatureException' => $baseDir . '/lib/public/Security/Signature/Exceptions/SignatureException.php',
'OCP\\Security\\Signature\\Exceptions\\SignatureIdentityNotFoundException' => $baseDir . '/lib/public/Security/Signature/Exceptions/SignatureIdentityNotFoundException.php',
'OCP\\Security\\Signature\\Exceptions\\SignatureNotFoundException' => $baseDir . '/lib/public/Security/Signature/Exceptions/SignatureNotFoundException.php',
'OCP\\Security\\Signature\\ISignatoryManager' => $baseDir . '/lib/public/Security/Signature/ISignatoryManager.php',
'OCP\\Security\\Signature\\ISignatureManager' => $baseDir . '/lib/public/Security/Signature/ISignatureManager.php',
'OCP\\Security\\Signature\\Model\\IIncomingSignedRequest' => $baseDir . '/lib/public/Security/Signature/Model/IIncomingSignedRequest.php',
'OCP\\Security\\Signature\\Model\\IOutgoingSignedRequest' => $baseDir . '/lib/public/Security/Signature/Model/IOutgoingSignedRequest.php',
'OCP\\Security\\Signature\\Model\\ISignatory' => $baseDir . '/lib/public/Security/Signature/Model/ISignatory.php',
'OCP\\Security\\Signature\\Model\\ISignedRequest' => $baseDir . '/lib/public/Security/Signature/Model/ISignedRequest.php',
'OCP\\Security\\Signature\\Model\\SignatoryStatus' => $baseDir . '/lib/public/Security/Signature/Model/SignatoryStatus.php',
'OCP\\Security\\Signature\\Model\\SignatoryType' => $baseDir . '/lib/public/Security/Signature/Model/SignatoryType.php',
'OCP\\Security\\Signature\\SignatureAlgorithm' => $baseDir . '/lib/public/Security/Signature/SignatureAlgorithm.php',
'OCP\\Security\\VerificationToken\\IVerificationToken' => $baseDir . '/lib/public/Security/VerificationToken/IVerificationToken.php',
'OCP\\Security\\VerificationToken\\InvalidTokenException' => $baseDir . '/lib/public/Security/VerificationToken/InvalidTokenException.php',
'OCP\\Server' => $baseDir . '/lib/public/Server.php',
Expand Down
48 changes: 24 additions & 24 deletions lib/composer/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,30 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2

public static $classMap = array (
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
'NCU\\Security\\PublicPrivateKeyPairs\\Exceptions\\KeyPairConflictException' => __DIR__ . '/../../..' . '/lib/unstable/Security/PublicPrivateKeyPairs/Exceptions/KeyPairConflictException.php',
'NCU\\Security\\PublicPrivateKeyPairs\\Exceptions\\KeyPairException' => __DIR__ . '/../../..' . '/lib/unstable/Security/PublicPrivateKeyPairs/Exceptions/KeyPairException.php',
'NCU\\Security\\PublicPrivateKeyPairs\\Exceptions\\KeyPairNotFoundException' => __DIR__ . '/../../..' . '/lib/unstable/Security/PublicPrivateKeyPairs/Exceptions/KeyPairNotFoundException.php',
'NCU\\Security\\PublicPrivateKeyPairs\\IKeyPairManager' => __DIR__ . '/../../..' . '/lib/unstable/Security/PublicPrivateKeyPairs/IKeyPairManager.php',
'NCU\\Security\\PublicPrivateKeyPairs\\Model\\IKeyPair' => __DIR__ . '/../../..' . '/lib/unstable/Security/PublicPrivateKeyPairs/Model/IKeyPair.php',
'NCU\\Security\\Signature\\Exceptions\\IncomingRequestException' => __DIR__ . '/../../..' . '/lib/unstable/Security/Signature/Exceptions/IncomingRequestException.php',
'NCU\\Security\\Signature\\Exceptions\\IncomingRequestNotFoundException' => __DIR__ . '/../../..' . '/lib/unstable/Security/Signature/Exceptions/IncomingRequestNotFoundException.php',
'NCU\\Security\\Signature\\Exceptions\\InvalidKeyOriginException' => __DIR__ . '/../../..' . '/lib/unstable/Security/Signature/Exceptions/InvalidKeyOriginException.php',
'NCU\\Security\\Signature\\Exceptions\\InvalidSignatureException' => __DIR__ . '/../../..' . '/lib/unstable/Security/Signature/Exceptions/InvalidSignatureException.php',
'NCU\\Security\\Signature\\Exceptions\\SignatoryConflictException' => __DIR__ . '/../../..' . '/lib/unstable/Security/Signature/Exceptions/SignatoryConflictException.php',
'NCU\\Security\\Signature\\Exceptions\\SignatoryException' => __DIR__ . '/../../..' . '/lib/unstable/Security/Signature/Exceptions/SignatoryException.php',
'NCU\\Security\\Signature\\Exceptions\\SignatoryNotFoundException' => __DIR__ . '/../../..' . '/lib/unstable/Security/Signature/Exceptions/SignatoryNotFoundException.php',
'NCU\\Security\\Signature\\Exceptions\\SignatureException' => __DIR__ . '/../../..' . '/lib/unstable/Security/Signature/Exceptions/SignatureException.php',
'NCU\\Security\\Signature\\Exceptions\\SignatureIdentityNotFoundException' => __DIR__ . '/../../..' . '/lib/unstable/Security/Signature/Exceptions/SignatureIdentityNotFoundException.php',
'NCU\\Security\\Signature\\Exceptions\\SignatureNotFoundException' => __DIR__ . '/../../..' . '/lib/unstable/Security/Signature/Exceptions/SignatureNotFoundException.php',
'NCU\\Security\\Signature\\ISignatoryManager' => __DIR__ . '/../../..' . '/lib/unstable/Security/Signature/ISignatoryManager.php',
'NCU\\Security\\Signature\\ISignatureManager' => __DIR__ . '/../../..' . '/lib/unstable/Security/Signature/ISignatureManager.php',
'NCU\\Security\\Signature\\Model\\IIncomingSignedRequest' => __DIR__ . '/../../..' . '/lib/unstable/Security/Signature/Model/IIncomingSignedRequest.php',
'NCU\\Security\\Signature\\Model\\IOutgoingSignedRequest' => __DIR__ . '/../../..' . '/lib/unstable/Security/Signature/Model/IOutgoingSignedRequest.php',
'NCU\\Security\\Signature\\Model\\ISignatory' => __DIR__ . '/../../..' . '/lib/unstable/Security/Signature/Model/ISignatory.php',
'NCU\\Security\\Signature\\Model\\ISignedRequest' => __DIR__ . '/../../..' . '/lib/unstable/Security/Signature/Model/ISignedRequest.php',
'NCU\\Security\\Signature\\Model\\SignatoryStatus' => __DIR__ . '/../../..' . '/lib/unstable/Security/Signature/Model/SignatoryStatus.php',
'NCU\\Security\\Signature\\Model\\SignatoryType' => __DIR__ . '/../../..' . '/lib/unstable/Security/Signature/Model/SignatoryType.php',
'NCU\\Security\\Signature\\SignatureAlgorithm' => __DIR__ . '/../../..' . '/lib/unstable/Security/Signature/SignatureAlgorithm.php',
'OCP\\Accounts\\IAccount' => __DIR__ . '/../../..' . '/lib/public/Accounts/IAccount.php',
'OCP\\Accounts\\IAccountManager' => __DIR__ . '/../../..' . '/lib/public/Accounts/IAccountManager.php',
'OCP\\Accounts\\IAccountProperty' => __DIR__ . '/../../..' . '/lib/public/Accounts/IAccountProperty.php',
Expand Down Expand Up @@ -728,32 +752,8 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2
'OCP\\Security\\Ip\\IRange' => __DIR__ . '/../../..' . '/lib/public/Security/Ip/IRange.php',
'OCP\\Security\\Ip\\IRemoteAddress' => __DIR__ . '/../../..' . '/lib/public/Security/Ip/IRemoteAddress.php',
'OCP\\Security\\PasswordContext' => __DIR__ . '/../../..' . '/lib/public/Security/PasswordContext.php',
'OCP\\Security\\PublicPrivateKeyPairs\\Exceptions\\KeyPairConflictException' => __DIR__ . '/../../..' . '/lib/public/Security/PublicPrivateKeyPairs/Exceptions/KeyPairConflictException.php',
'OCP\\Security\\PublicPrivateKeyPairs\\Exceptions\\KeyPairException' => __DIR__ . '/../../..' . '/lib/public/Security/PublicPrivateKeyPairs/Exceptions/KeyPairException.php',
'OCP\\Security\\PublicPrivateKeyPairs\\Exceptions\\KeyPairNotFoundException' => __DIR__ . '/../../..' . '/lib/public/Security/PublicPrivateKeyPairs/Exceptions/KeyPairNotFoundException.php',
'OCP\\Security\\PublicPrivateKeyPairs\\IKeyPairManager' => __DIR__ . '/../../..' . '/lib/public/Security/PublicPrivateKeyPairs/IKeyPairManager.php',
'OCP\\Security\\PublicPrivateKeyPairs\\Model\\IKeyPair' => __DIR__ . '/../../..' . '/lib/public/Security/PublicPrivateKeyPairs/Model/IKeyPair.php',
'OCP\\Security\\RateLimiting\\ILimiter' => __DIR__ . '/../../..' . '/lib/public/Security/RateLimiting/ILimiter.php',
'OCP\\Security\\RateLimiting\\IRateLimitExceededException' => __DIR__ . '/../../..' . '/lib/public/Security/RateLimiting/IRateLimitExceededException.php',
'OCP\\Security\\Signature\\Exceptions\\IncomingRequestException' => __DIR__ . '/../../..' . '/lib/public/Security/Signature/Exceptions/IncomingRequestException.php',
'OCP\\Security\\Signature\\Exceptions\\IncomingRequestNotFoundException' => __DIR__ . '/../../..' . '/lib/public/Security/Signature/Exceptions/IncomingRequestNotFoundException.php',
'OCP\\Security\\Signature\\Exceptions\\InvalidKeyOriginException' => __DIR__ . '/../../..' . '/lib/public/Security/Signature/Exceptions/InvalidKeyOriginException.php',
'OCP\\Security\\Signature\\Exceptions\\InvalidSignatureException' => __DIR__ . '/../../..' . '/lib/public/Security/Signature/Exceptions/InvalidSignatureException.php',
'OCP\\Security\\Signature\\Exceptions\\SignatoryConflictException' => __DIR__ . '/../../..' . '/lib/public/Security/Signature/Exceptions/SignatoryConflictException.php',
'OCP\\Security\\Signature\\Exceptions\\SignatoryException' => __DIR__ . '/../../..' . '/lib/public/Security/Signature/Exceptions/SignatoryException.php',
'OCP\\Security\\Signature\\Exceptions\\SignatoryNotFoundException' => __DIR__ . '/../../..' . '/lib/public/Security/Signature/Exceptions/SignatoryNotFoundException.php',
'OCP\\Security\\Signature\\Exceptions\\SignatureException' => __DIR__ . '/../../..' . '/lib/public/Security/Signature/Exceptions/SignatureException.php',
'OCP\\Security\\Signature\\Exceptions\\SignatureIdentityNotFoundException' => __DIR__ . '/../../..' . '/lib/public/Security/Signature/Exceptions/SignatureIdentityNotFoundException.php',
'OCP\\Security\\Signature\\Exceptions\\SignatureNotFoundException' => __DIR__ . '/../../..' . '/lib/public/Security/Signature/Exceptions/SignatureNotFoundException.php',
'OCP\\Security\\Signature\\ISignatoryManager' => __DIR__ . '/../../..' . '/lib/public/Security/Signature/ISignatoryManager.php',
'OCP\\Security\\Signature\\ISignatureManager' => __DIR__ . '/../../..' . '/lib/public/Security/Signature/ISignatureManager.php',
'OCP\\Security\\Signature\\Model\\IIncomingSignedRequest' => __DIR__ . '/../../..' . '/lib/public/Security/Signature/Model/IIncomingSignedRequest.php',
'OCP\\Security\\Signature\\Model\\IOutgoingSignedRequest' => __DIR__ . '/../../..' . '/lib/public/Security/Signature/Model/IOutgoingSignedRequest.php',
'OCP\\Security\\Signature\\Model\\ISignatory' => __DIR__ . '/../../..' . '/lib/public/Security/Signature/Model/ISignatory.php',
'OCP\\Security\\Signature\\Model\\ISignedRequest' => __DIR__ . '/../../..' . '/lib/public/Security/Signature/Model/ISignedRequest.php',
'OCP\\Security\\Signature\\Model\\SignatoryStatus' => __DIR__ . '/../../..' . '/lib/public/Security/Signature/Model/SignatoryStatus.php',
'OCP\\Security\\Signature\\Model\\SignatoryType' => __DIR__ . '/../../..' . '/lib/public/Security/Signature/Model/SignatoryType.php',
'OCP\\Security\\Signature\\SignatureAlgorithm' => __DIR__ . '/../../..' . '/lib/public/Security/Signature/SignatureAlgorithm.php',
'OCP\\Security\\VerificationToken\\IVerificationToken' => __DIR__ . '/../../..' . '/lib/public/Security/VerificationToken/IVerificationToken.php',
'OCP\\Security\\VerificationToken\\InvalidTokenException' => __DIR__ . '/../../..' . '/lib/public/Security/VerificationToken/InvalidTokenException.php',
'OCP\\Server' => __DIR__ . '/../../..' . '/lib/public/Server.php',
Expand Down
Loading

0 comments on commit 6a8d615

Please sign in to comment.