@@ -29,39 +29,39 @@ |
||
| 29 | 29 | |
| 30 | 30 | class Admin implements ISettings { |
| 31 | 31 | |
| 32 | - /** @var TrustedServers */ |
|
| 33 | - private $trustedServers; |
|
| 32 | + /** @var TrustedServers */ |
|
| 33 | + private $trustedServers; |
|
| 34 | 34 | |
| 35 | - public function __construct(TrustedServers $trustedServers) { |
|
| 36 | - $this->trustedServers = $trustedServers; |
|
| 37 | - } |
|
| 35 | + public function __construct(TrustedServers $trustedServers) { |
|
| 36 | + $this->trustedServers = $trustedServers; |
|
| 37 | + } |
|
| 38 | 38 | |
| 39 | - /** |
|
| 40 | - * @return TemplateResponse |
|
| 41 | - */ |
|
| 42 | - public function getForm() { |
|
| 43 | - $parameters = [ |
|
| 44 | - 'trustedServers' => $this->trustedServers->getServers(), |
|
| 45 | - ]; |
|
| 39 | + /** |
|
| 40 | + * @return TemplateResponse |
|
| 41 | + */ |
|
| 42 | + public function getForm() { |
|
| 43 | + $parameters = [ |
|
| 44 | + 'trustedServers' => $this->trustedServers->getServers(), |
|
| 45 | + ]; |
|
| 46 | 46 | |
| 47 | - return new TemplateResponse('federation', 'settings-admin', $parameters, ''); |
|
| 48 | - } |
|
| 47 | + return new TemplateResponse('federation', 'settings-admin', $parameters, ''); |
|
| 48 | + } |
|
| 49 | 49 | |
| 50 | - /** |
|
| 51 | - * @return string the section ID, e.g. 'sharing' |
|
| 52 | - */ |
|
| 53 | - public function getSection() { |
|
| 54 | - return 'sharing'; |
|
| 55 | - } |
|
| 50 | + /** |
|
| 51 | + * @return string the section ID, e.g. 'sharing' |
|
| 52 | + */ |
|
| 53 | + public function getSection() { |
|
| 54 | + return 'sharing'; |
|
| 55 | + } |
|
| 56 | 56 | |
| 57 | - /** |
|
| 58 | - * @return int whether the form should be rather on the top or bottom of |
|
| 59 | - * the admin section. The forms are arranged in ascending order of the |
|
| 60 | - * priority values. It is required to return a value between 0 and 100. |
|
| 61 | - * |
|
| 62 | - * E.g.: 70 |
|
| 63 | - */ |
|
| 64 | - public function getPriority() { |
|
| 65 | - return 30; |
|
| 66 | - } |
|
| 57 | + /** |
|
| 58 | + * @return int whether the form should be rather on the top or bottom of |
|
| 59 | + * the admin section. The forms are arranged in ascending order of the |
|
| 60 | + * priority values. It is required to return a value between 0 and 100. |
|
| 61 | + * |
|
| 62 | + * E.g.: 70 |
|
| 63 | + */ |
|
| 64 | + public function getPriority() { |
|
| 65 | + return 30; |
|
| 66 | + } |
|
| 67 | 67 | } |
@@ -42,227 +42,227 @@ |
||
| 42 | 42 | |
| 43 | 43 | class TrustedServers { |
| 44 | 44 | |
| 45 | - /** after a user list was exchanged at least once successfully */ |
|
| 46 | - public const STATUS_OK = 1; |
|
| 47 | - /** waiting for shared secret or initial user list exchange */ |
|
| 48 | - public const STATUS_PENDING = 2; |
|
| 49 | - /** something went wrong, misconfigured server, software bug,... user interaction needed */ |
|
| 50 | - public const STATUS_FAILURE = 3; |
|
| 51 | - /** remote server revoked access */ |
|
| 52 | - public const STATUS_ACCESS_REVOKED = 4; |
|
| 45 | + /** after a user list was exchanged at least once successfully */ |
|
| 46 | + public const STATUS_OK = 1; |
|
| 47 | + /** waiting for shared secret or initial user list exchange */ |
|
| 48 | + public const STATUS_PENDING = 2; |
|
| 49 | + /** something went wrong, misconfigured server, software bug,... user interaction needed */ |
|
| 50 | + public const STATUS_FAILURE = 3; |
|
| 51 | + /** remote server revoked access */ |
|
| 52 | + public const STATUS_ACCESS_REVOKED = 4; |
|
| 53 | 53 | |
| 54 | - /** @var dbHandler */ |
|
| 55 | - private $dbHandler; |
|
| 54 | + /** @var dbHandler */ |
|
| 55 | + private $dbHandler; |
|
| 56 | 56 | |
| 57 | - /** @var IClientService */ |
|
| 58 | - private $httpClientService; |
|
| 57 | + /** @var IClientService */ |
|
| 58 | + private $httpClientService; |
|
| 59 | 59 | |
| 60 | - /** @var ILogger */ |
|
| 61 | - private $logger; |
|
| 60 | + /** @var ILogger */ |
|
| 61 | + private $logger; |
|
| 62 | 62 | |
| 63 | - /** @var IJobList */ |
|
| 64 | - private $jobList; |
|
| 63 | + /** @var IJobList */ |
|
| 64 | + private $jobList; |
|
| 65 | 65 | |
| 66 | - /** @var ISecureRandom */ |
|
| 67 | - private $secureRandom; |
|
| 66 | + /** @var ISecureRandom */ |
|
| 67 | + private $secureRandom; |
|
| 68 | 68 | |
| 69 | - /** @var IConfig */ |
|
| 70 | - private $config; |
|
| 69 | + /** @var IConfig */ |
|
| 70 | + private $config; |
|
| 71 | 71 | |
| 72 | - /** @var EventDispatcherInterface */ |
|
| 73 | - private $dispatcher; |
|
| 72 | + /** @var EventDispatcherInterface */ |
|
| 73 | + private $dispatcher; |
|
| 74 | 74 | |
| 75 | - /** @var ITimeFactory */ |
|
| 76 | - private $timeFactory; |
|
| 75 | + /** @var ITimeFactory */ |
|
| 76 | + private $timeFactory; |
|
| 77 | 77 | |
| 78 | - /** |
|
| 79 | - * @param DbHandler $dbHandler |
|
| 80 | - * @param IClientService $httpClientService |
|
| 81 | - * @param ILogger $logger |
|
| 82 | - * @param IJobList $jobList |
|
| 83 | - * @param ISecureRandom $secureRandom |
|
| 84 | - * @param IConfig $config |
|
| 85 | - * @param EventDispatcherInterface $dispatcher |
|
| 86 | - * @param ITimeFactory $timeFactory |
|
| 87 | - */ |
|
| 88 | - public function __construct( |
|
| 89 | - DbHandler $dbHandler, |
|
| 90 | - IClientService $httpClientService, |
|
| 91 | - ILogger $logger, |
|
| 92 | - IJobList $jobList, |
|
| 93 | - ISecureRandom $secureRandom, |
|
| 94 | - IConfig $config, |
|
| 95 | - EventDispatcherInterface $dispatcher, |
|
| 96 | - ITimeFactory $timeFactory |
|
| 97 | - ) { |
|
| 98 | - $this->dbHandler = $dbHandler; |
|
| 99 | - $this->httpClientService = $httpClientService; |
|
| 100 | - $this->logger = $logger; |
|
| 101 | - $this->jobList = $jobList; |
|
| 102 | - $this->secureRandom = $secureRandom; |
|
| 103 | - $this->config = $config; |
|
| 104 | - $this->dispatcher = $dispatcher; |
|
| 105 | - $this->timeFactory = $timeFactory; |
|
| 106 | - } |
|
| 78 | + /** |
|
| 79 | + * @param DbHandler $dbHandler |
|
| 80 | + * @param IClientService $httpClientService |
|
| 81 | + * @param ILogger $logger |
|
| 82 | + * @param IJobList $jobList |
|
| 83 | + * @param ISecureRandom $secureRandom |
|
| 84 | + * @param IConfig $config |
|
| 85 | + * @param EventDispatcherInterface $dispatcher |
|
| 86 | + * @param ITimeFactory $timeFactory |
|
| 87 | + */ |
|
| 88 | + public function __construct( |
|
| 89 | + DbHandler $dbHandler, |
|
| 90 | + IClientService $httpClientService, |
|
| 91 | + ILogger $logger, |
|
| 92 | + IJobList $jobList, |
|
| 93 | + ISecureRandom $secureRandom, |
|
| 94 | + IConfig $config, |
|
| 95 | + EventDispatcherInterface $dispatcher, |
|
| 96 | + ITimeFactory $timeFactory |
|
| 97 | + ) { |
|
| 98 | + $this->dbHandler = $dbHandler; |
|
| 99 | + $this->httpClientService = $httpClientService; |
|
| 100 | + $this->logger = $logger; |
|
| 101 | + $this->jobList = $jobList; |
|
| 102 | + $this->secureRandom = $secureRandom; |
|
| 103 | + $this->config = $config; |
|
| 104 | + $this->dispatcher = $dispatcher; |
|
| 105 | + $this->timeFactory = $timeFactory; |
|
| 106 | + } |
|
| 107 | 107 | |
| 108 | - /** |
|
| 109 | - * add server to the list of trusted servers |
|
| 110 | - * |
|
| 111 | - * @param $url |
|
| 112 | - * @return int server id |
|
| 113 | - */ |
|
| 114 | - public function addServer($url) { |
|
| 115 | - $url = $this->updateProtocol($url); |
|
| 116 | - $result = $this->dbHandler->addServer($url); |
|
| 117 | - if ($result) { |
|
| 118 | - $token = $this->secureRandom->generate(16); |
|
| 119 | - $this->dbHandler->addToken($url, $token); |
|
| 120 | - $this->jobList->add( |
|
| 121 | - RequestSharedSecret::class, |
|
| 122 | - [ |
|
| 123 | - 'url' => $url, |
|
| 124 | - 'token' => $token, |
|
| 125 | - 'created' => $this->timeFactory->getTime() |
|
| 126 | - ] |
|
| 127 | - ); |
|
| 128 | - } |
|
| 108 | + /** |
|
| 109 | + * add server to the list of trusted servers |
|
| 110 | + * |
|
| 111 | + * @param $url |
|
| 112 | + * @return int server id |
|
| 113 | + */ |
|
| 114 | + public function addServer($url) { |
|
| 115 | + $url = $this->updateProtocol($url); |
|
| 116 | + $result = $this->dbHandler->addServer($url); |
|
| 117 | + if ($result) { |
|
| 118 | + $token = $this->secureRandom->generate(16); |
|
| 119 | + $this->dbHandler->addToken($url, $token); |
|
| 120 | + $this->jobList->add( |
|
| 121 | + RequestSharedSecret::class, |
|
| 122 | + [ |
|
| 123 | + 'url' => $url, |
|
| 124 | + 'token' => $token, |
|
| 125 | + 'created' => $this->timeFactory->getTime() |
|
| 126 | + ] |
|
| 127 | + ); |
|
| 128 | + } |
|
| 129 | 129 | |
| 130 | - return $result; |
|
| 131 | - } |
|
| 130 | + return $result; |
|
| 131 | + } |
|
| 132 | 132 | |
| 133 | - /** |
|
| 134 | - * get shared secret for the given server |
|
| 135 | - * |
|
| 136 | - * @param string $url |
|
| 137 | - * @return string |
|
| 138 | - */ |
|
| 139 | - public function getSharedSecret($url) { |
|
| 140 | - return $this->dbHandler->getSharedSecret($url); |
|
| 141 | - } |
|
| 133 | + /** |
|
| 134 | + * get shared secret for the given server |
|
| 135 | + * |
|
| 136 | + * @param string $url |
|
| 137 | + * @return string |
|
| 138 | + */ |
|
| 139 | + public function getSharedSecret($url) { |
|
| 140 | + return $this->dbHandler->getSharedSecret($url); |
|
| 141 | + } |
|
| 142 | 142 | |
| 143 | - /** |
|
| 144 | - * add shared secret for the given server |
|
| 145 | - * |
|
| 146 | - * @param string $url |
|
| 147 | - * @param $sharedSecret |
|
| 148 | - */ |
|
| 149 | - public function addSharedSecret($url, $sharedSecret) { |
|
| 150 | - $this->dbHandler->addSharedSecret($url, $sharedSecret); |
|
| 151 | - } |
|
| 143 | + /** |
|
| 144 | + * add shared secret for the given server |
|
| 145 | + * |
|
| 146 | + * @param string $url |
|
| 147 | + * @param $sharedSecret |
|
| 148 | + */ |
|
| 149 | + public function addSharedSecret($url, $sharedSecret) { |
|
| 150 | + $this->dbHandler->addSharedSecret($url, $sharedSecret); |
|
| 151 | + } |
|
| 152 | 152 | |
| 153 | - /** |
|
| 154 | - * remove server from the list of trusted servers |
|
| 155 | - * |
|
| 156 | - * @param int $id |
|
| 157 | - */ |
|
| 158 | - public function removeServer($id) { |
|
| 159 | - $server = $this->dbHandler->getServerById($id); |
|
| 160 | - $this->dbHandler->removeServer($id); |
|
| 161 | - $event = new GenericEvent($server['url_hash']); |
|
| 162 | - $this->dispatcher->dispatch('OCP\Federation\TrustedServerEvent::remove', $event); |
|
| 163 | - } |
|
| 153 | + /** |
|
| 154 | + * remove server from the list of trusted servers |
|
| 155 | + * |
|
| 156 | + * @param int $id |
|
| 157 | + */ |
|
| 158 | + public function removeServer($id) { |
|
| 159 | + $server = $this->dbHandler->getServerById($id); |
|
| 160 | + $this->dbHandler->removeServer($id); |
|
| 161 | + $event = new GenericEvent($server['url_hash']); |
|
| 162 | + $this->dispatcher->dispatch('OCP\Federation\TrustedServerEvent::remove', $event); |
|
| 163 | + } |
|
| 164 | 164 | |
| 165 | - /** |
|
| 166 | - * get all trusted servers |
|
| 167 | - * |
|
| 168 | - * @return array |
|
| 169 | - */ |
|
| 170 | - public function getServers() { |
|
| 171 | - return $this->dbHandler->getAllServer(); |
|
| 172 | - } |
|
| 165 | + /** |
|
| 166 | + * get all trusted servers |
|
| 167 | + * |
|
| 168 | + * @return array |
|
| 169 | + */ |
|
| 170 | + public function getServers() { |
|
| 171 | + return $this->dbHandler->getAllServer(); |
|
| 172 | + } |
|
| 173 | 173 | |
| 174 | - /** |
|
| 175 | - * check if given server is a trusted Nextcloud server |
|
| 176 | - * |
|
| 177 | - * @param string $url |
|
| 178 | - * @return bool |
|
| 179 | - */ |
|
| 180 | - public function isTrustedServer($url) { |
|
| 181 | - return $this->dbHandler->serverExists($url); |
|
| 182 | - } |
|
| 174 | + /** |
|
| 175 | + * check if given server is a trusted Nextcloud server |
|
| 176 | + * |
|
| 177 | + * @param string $url |
|
| 178 | + * @return bool |
|
| 179 | + */ |
|
| 180 | + public function isTrustedServer($url) { |
|
| 181 | + return $this->dbHandler->serverExists($url); |
|
| 182 | + } |
|
| 183 | 183 | |
| 184 | - /** |
|
| 185 | - * set server status |
|
| 186 | - * |
|
| 187 | - * @param string $url |
|
| 188 | - * @param int $status |
|
| 189 | - */ |
|
| 190 | - public function setServerStatus($url, $status) { |
|
| 191 | - $this->dbHandler->setServerStatus($url, $status); |
|
| 192 | - } |
|
| 184 | + /** |
|
| 185 | + * set server status |
|
| 186 | + * |
|
| 187 | + * @param string $url |
|
| 188 | + * @param int $status |
|
| 189 | + */ |
|
| 190 | + public function setServerStatus($url, $status) { |
|
| 191 | + $this->dbHandler->setServerStatus($url, $status); |
|
| 192 | + } |
|
| 193 | 193 | |
| 194 | - /** |
|
| 195 | - * @param string $url |
|
| 196 | - * @return int |
|
| 197 | - */ |
|
| 198 | - public function getServerStatus($url) { |
|
| 199 | - return $this->dbHandler->getServerStatus($url); |
|
| 200 | - } |
|
| 194 | + /** |
|
| 195 | + * @param string $url |
|
| 196 | + * @return int |
|
| 197 | + */ |
|
| 198 | + public function getServerStatus($url) { |
|
| 199 | + return $this->dbHandler->getServerStatus($url); |
|
| 200 | + } |
|
| 201 | 201 | |
| 202 | - /** |
|
| 203 | - * check if URL point to a ownCloud/Nextcloud server |
|
| 204 | - * |
|
| 205 | - * @param string $url |
|
| 206 | - * @return bool |
|
| 207 | - */ |
|
| 208 | - public function isOwnCloudServer($url) { |
|
| 209 | - $isValidOwnCloud = false; |
|
| 210 | - $client = $this->httpClientService->newClient(); |
|
| 211 | - try { |
|
| 212 | - $result = $client->get( |
|
| 213 | - $url . '/status.php', |
|
| 214 | - [ |
|
| 215 | - 'timeout' => 3, |
|
| 216 | - 'connect_timeout' => 3, |
|
| 217 | - ] |
|
| 218 | - ); |
|
| 219 | - if ($result->getStatusCode() === Http::STATUS_OK) { |
|
| 220 | - $isValidOwnCloud = $this->checkOwnCloudVersion($result->getBody()); |
|
| 221 | - } |
|
| 222 | - } catch (\Exception $e) { |
|
| 223 | - \OC::$server->getLogger()->logException($e, [ |
|
| 224 | - 'message' => 'No Nextcloud server.', |
|
| 225 | - 'level' => ILogger::DEBUG, |
|
| 226 | - 'app' => 'federation', |
|
| 227 | - ]); |
|
| 228 | - return false; |
|
| 229 | - } |
|
| 202 | + /** |
|
| 203 | + * check if URL point to a ownCloud/Nextcloud server |
|
| 204 | + * |
|
| 205 | + * @param string $url |
|
| 206 | + * @return bool |
|
| 207 | + */ |
|
| 208 | + public function isOwnCloudServer($url) { |
|
| 209 | + $isValidOwnCloud = false; |
|
| 210 | + $client = $this->httpClientService->newClient(); |
|
| 211 | + try { |
|
| 212 | + $result = $client->get( |
|
| 213 | + $url . '/status.php', |
|
| 214 | + [ |
|
| 215 | + 'timeout' => 3, |
|
| 216 | + 'connect_timeout' => 3, |
|
| 217 | + ] |
|
| 218 | + ); |
|
| 219 | + if ($result->getStatusCode() === Http::STATUS_OK) { |
|
| 220 | + $isValidOwnCloud = $this->checkOwnCloudVersion($result->getBody()); |
|
| 221 | + } |
|
| 222 | + } catch (\Exception $e) { |
|
| 223 | + \OC::$server->getLogger()->logException($e, [ |
|
| 224 | + 'message' => 'No Nextcloud server.', |
|
| 225 | + 'level' => ILogger::DEBUG, |
|
| 226 | + 'app' => 'federation', |
|
| 227 | + ]); |
|
| 228 | + return false; |
|
| 229 | + } |
|
| 230 | 230 | |
| 231 | - return $isValidOwnCloud; |
|
| 232 | - } |
|
| 231 | + return $isValidOwnCloud; |
|
| 232 | + } |
|
| 233 | 233 | |
| 234 | - /** |
|
| 235 | - * check if ownCloud version is >= 9.0 |
|
| 236 | - * |
|
| 237 | - * @param $status |
|
| 238 | - * @return bool |
|
| 239 | - * @throws HintException |
|
| 240 | - */ |
|
| 241 | - protected function checkOwnCloudVersion($status) { |
|
| 242 | - $decoded = json_decode($status, true); |
|
| 243 | - if (!empty($decoded) && isset($decoded['version'])) { |
|
| 244 | - if (!version_compare($decoded['version'], '9.0.0', '>=')) { |
|
| 245 | - throw new HintException('Remote server version is too low. 9.0 is required.'); |
|
| 246 | - } |
|
| 247 | - return true; |
|
| 248 | - } |
|
| 249 | - return false; |
|
| 250 | - } |
|
| 234 | + /** |
|
| 235 | + * check if ownCloud version is >= 9.0 |
|
| 236 | + * |
|
| 237 | + * @param $status |
|
| 238 | + * @return bool |
|
| 239 | + * @throws HintException |
|
| 240 | + */ |
|
| 241 | + protected function checkOwnCloudVersion($status) { |
|
| 242 | + $decoded = json_decode($status, true); |
|
| 243 | + if (!empty($decoded) && isset($decoded['version'])) { |
|
| 244 | + if (!version_compare($decoded['version'], '9.0.0', '>=')) { |
|
| 245 | + throw new HintException('Remote server version is too low. 9.0 is required.'); |
|
| 246 | + } |
|
| 247 | + return true; |
|
| 248 | + } |
|
| 249 | + return false; |
|
| 250 | + } |
|
| 251 | 251 | |
| 252 | - /** |
|
| 253 | - * check if the URL contain a protocol, if not add https |
|
| 254 | - * |
|
| 255 | - * @param string $url |
|
| 256 | - * @return string |
|
| 257 | - */ |
|
| 258 | - protected function updateProtocol($url) { |
|
| 259 | - if ( |
|
| 260 | - strpos($url, 'https://') === 0 |
|
| 261 | - || strpos($url, 'http://') === 0 |
|
| 262 | - ) { |
|
| 263 | - return $url; |
|
| 264 | - } |
|
| 252 | + /** |
|
| 253 | + * check if the URL contain a protocol, if not add https |
|
| 254 | + * |
|
| 255 | + * @param string $url |
|
| 256 | + * @return string |
|
| 257 | + */ |
|
| 258 | + protected function updateProtocol($url) { |
|
| 259 | + if ( |
|
| 260 | + strpos($url, 'https://') === 0 |
|
| 261 | + || strpos($url, 'http://') === 0 |
|
| 262 | + ) { |
|
| 263 | + return $url; |
|
| 264 | + } |
|
| 265 | 265 | |
| 266 | - return 'https://' . $url; |
|
| 267 | - } |
|
| 266 | + return 'https://' . $url; |
|
| 267 | + } |
|
| 268 | 268 | } |
@@ -6,42 +6,42 @@ |
||
| 6 | 6 | |
| 7 | 7 | class ComposerStaticInitFederation |
| 8 | 8 | { |
| 9 | - public static $prefixLengthsPsr4 = array ( |
|
| 9 | + public static $prefixLengthsPsr4 = array( |
|
| 10 | 10 | 'O' => |
| 11 | - array ( |
|
| 11 | + array( |
|
| 12 | 12 | 'OCA\\Federation\\' => 15, |
| 13 | 13 | ), |
| 14 | 14 | ); |
| 15 | 15 | |
| 16 | - public static $prefixDirsPsr4 = array ( |
|
| 16 | + public static $prefixDirsPsr4 = array( |
|
| 17 | 17 | 'OCA\\Federation\\' => |
| 18 | - array ( |
|
| 19 | - 0 => __DIR__ . '/..' . '/../lib', |
|
| 18 | + array( |
|
| 19 | + 0 => __DIR__.'/..'.'/../lib', |
|
| 20 | 20 | ), |
| 21 | 21 | ); |
| 22 | 22 | |
| 23 | - public static $classMap = array ( |
|
| 24 | - 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', |
|
| 25 | - 'OCA\\Federation\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php', |
|
| 26 | - 'OCA\\Federation\\BackgroundJob\\GetSharedSecret' => __DIR__ . '/..' . '/../lib/BackgroundJob/GetSharedSecret.php', |
|
| 27 | - 'OCA\\Federation\\BackgroundJob\\RequestSharedSecret' => __DIR__ . '/..' . '/../lib/BackgroundJob/RequestSharedSecret.php', |
|
| 28 | - 'OCA\\Federation\\Command\\SyncFederationAddressBooks' => __DIR__ . '/..' . '/../lib/Command/SyncFederationAddressBooks.php', |
|
| 29 | - 'OCA\\Federation\\Controller\\OCSAuthAPIController' => __DIR__ . '/..' . '/../lib/Controller/OCSAuthAPIController.php', |
|
| 30 | - 'OCA\\Federation\\Controller\\SettingsController' => __DIR__ . '/..' . '/../lib/Controller/SettingsController.php', |
|
| 31 | - 'OCA\\Federation\\DAV\\FedAuth' => __DIR__ . '/..' . '/../lib/DAV/FedAuth.php', |
|
| 32 | - 'OCA\\Federation\\DbHandler' => __DIR__ . '/..' . '/../lib/DbHandler.php', |
|
| 33 | - 'OCA\\Federation\\Listener\\SabrePluginAuthInitListener' => __DIR__ . '/..' . '/../lib/Listener/SabrePluginAuthInitListener.php', |
|
| 34 | - 'OCA\\Federation\\Middleware\\AddServerMiddleware' => __DIR__ . '/..' . '/../lib/Middleware/AddServerMiddleware.php', |
|
| 35 | - 'OCA\\Federation\\Migration\\Version1010Date20200630191302' => __DIR__ . '/..' . '/../lib/Migration/Version1010Date20200630191302.php', |
|
| 36 | - 'OCA\\Federation\\Settings\\Admin' => __DIR__ . '/..' . '/../lib/Settings/Admin.php', |
|
| 37 | - 'OCA\\Federation\\SyncFederationAddressBooks' => __DIR__ . '/..' . '/../lib/SyncFederationAddressBooks.php', |
|
| 38 | - 'OCA\\Federation\\SyncJob' => __DIR__ . '/..' . '/../lib/SyncJob.php', |
|
| 39 | - 'OCA\\Federation\\TrustedServers' => __DIR__ . '/..' . '/../lib/TrustedServers.php', |
|
| 23 | + public static $classMap = array( |
|
| 24 | + 'Composer\\InstalledVersions' => __DIR__.'/..'.'/composer/InstalledVersions.php', |
|
| 25 | + 'OCA\\Federation\\AppInfo\\Application' => __DIR__.'/..'.'/../lib/AppInfo/Application.php', |
|
| 26 | + 'OCA\\Federation\\BackgroundJob\\GetSharedSecret' => __DIR__.'/..'.'/../lib/BackgroundJob/GetSharedSecret.php', |
|
| 27 | + 'OCA\\Federation\\BackgroundJob\\RequestSharedSecret' => __DIR__.'/..'.'/../lib/BackgroundJob/RequestSharedSecret.php', |
|
| 28 | + 'OCA\\Federation\\Command\\SyncFederationAddressBooks' => __DIR__.'/..'.'/../lib/Command/SyncFederationAddressBooks.php', |
|
| 29 | + 'OCA\\Federation\\Controller\\OCSAuthAPIController' => __DIR__.'/..'.'/../lib/Controller/OCSAuthAPIController.php', |
|
| 30 | + 'OCA\\Federation\\Controller\\SettingsController' => __DIR__.'/..'.'/../lib/Controller/SettingsController.php', |
|
| 31 | + 'OCA\\Federation\\DAV\\FedAuth' => __DIR__.'/..'.'/../lib/DAV/FedAuth.php', |
|
| 32 | + 'OCA\\Federation\\DbHandler' => __DIR__.'/..'.'/../lib/DbHandler.php', |
|
| 33 | + 'OCA\\Federation\\Listener\\SabrePluginAuthInitListener' => __DIR__.'/..'.'/../lib/Listener/SabrePluginAuthInitListener.php', |
|
| 34 | + 'OCA\\Federation\\Middleware\\AddServerMiddleware' => __DIR__.'/..'.'/../lib/Middleware/AddServerMiddleware.php', |
|
| 35 | + 'OCA\\Federation\\Migration\\Version1010Date20200630191302' => __DIR__.'/..'.'/../lib/Migration/Version1010Date20200630191302.php', |
|
| 36 | + 'OCA\\Federation\\Settings\\Admin' => __DIR__.'/..'.'/../lib/Settings/Admin.php', |
|
| 37 | + 'OCA\\Federation\\SyncFederationAddressBooks' => __DIR__.'/..'.'/../lib/SyncFederationAddressBooks.php', |
|
| 38 | + 'OCA\\Federation\\SyncJob' => __DIR__.'/..'.'/../lib/SyncJob.php', |
|
| 39 | + 'OCA\\Federation\\TrustedServers' => __DIR__.'/..'.'/../lib/TrustedServers.php', |
|
| 40 | 40 | ); |
| 41 | 41 | |
| 42 | 42 | public static function getInitializer(ClassLoader $loader) |
| 43 | 43 | { |
| 44 | - return \Closure::bind(function () use ($loader) { |
|
| 44 | + return \Closure::bind(function() use ($loader) { |
|
| 45 | 45 | $loader->prefixLengthsPsr4 = ComposerStaticInitFederation::$prefixLengthsPsr4; |
| 46 | 46 | $loader->prefixDirsPsr4 = ComposerStaticInitFederation::$prefixDirsPsr4; |
| 47 | 47 | $loader->classMap = ComposerStaticInitFederation::$classMap; |
@@ -6,20 +6,20 @@ |
||
| 6 | 6 | $baseDir = $vendorDir; |
| 7 | 7 | |
| 8 | 8 | return array( |
| 9 | - 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', |
|
| 10 | - 'OCA\\Federation\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php', |
|
| 11 | - 'OCA\\Federation\\BackgroundJob\\GetSharedSecret' => $baseDir . '/../lib/BackgroundJob/GetSharedSecret.php', |
|
| 12 | - 'OCA\\Federation\\BackgroundJob\\RequestSharedSecret' => $baseDir . '/../lib/BackgroundJob/RequestSharedSecret.php', |
|
| 13 | - 'OCA\\Federation\\Command\\SyncFederationAddressBooks' => $baseDir . '/../lib/Command/SyncFederationAddressBooks.php', |
|
| 14 | - 'OCA\\Federation\\Controller\\OCSAuthAPIController' => $baseDir . '/../lib/Controller/OCSAuthAPIController.php', |
|
| 15 | - 'OCA\\Federation\\Controller\\SettingsController' => $baseDir . '/../lib/Controller/SettingsController.php', |
|
| 16 | - 'OCA\\Federation\\DAV\\FedAuth' => $baseDir . '/../lib/DAV/FedAuth.php', |
|
| 17 | - 'OCA\\Federation\\DbHandler' => $baseDir . '/../lib/DbHandler.php', |
|
| 18 | - 'OCA\\Federation\\Listener\\SabrePluginAuthInitListener' => $baseDir . '/../lib/Listener/SabrePluginAuthInitListener.php', |
|
| 19 | - 'OCA\\Federation\\Middleware\\AddServerMiddleware' => $baseDir . '/../lib/Middleware/AddServerMiddleware.php', |
|
| 20 | - 'OCA\\Federation\\Migration\\Version1010Date20200630191302' => $baseDir . '/../lib/Migration/Version1010Date20200630191302.php', |
|
| 21 | - 'OCA\\Federation\\Settings\\Admin' => $baseDir . '/../lib/Settings/Admin.php', |
|
| 22 | - 'OCA\\Federation\\SyncFederationAddressBooks' => $baseDir . '/../lib/SyncFederationAddressBooks.php', |
|
| 23 | - 'OCA\\Federation\\SyncJob' => $baseDir . '/../lib/SyncJob.php', |
|
| 24 | - 'OCA\\Federation\\TrustedServers' => $baseDir . '/../lib/TrustedServers.php', |
|
| 9 | + 'Composer\\InstalledVersions' => $vendorDir.'/composer/InstalledVersions.php', |
|
| 10 | + 'OCA\\Federation\\AppInfo\\Application' => $baseDir.'/../lib/AppInfo/Application.php', |
|
| 11 | + 'OCA\\Federation\\BackgroundJob\\GetSharedSecret' => $baseDir.'/../lib/BackgroundJob/GetSharedSecret.php', |
|
| 12 | + 'OCA\\Federation\\BackgroundJob\\RequestSharedSecret' => $baseDir.'/../lib/BackgroundJob/RequestSharedSecret.php', |
|
| 13 | + 'OCA\\Federation\\Command\\SyncFederationAddressBooks' => $baseDir.'/../lib/Command/SyncFederationAddressBooks.php', |
|
| 14 | + 'OCA\\Federation\\Controller\\OCSAuthAPIController' => $baseDir.'/../lib/Controller/OCSAuthAPIController.php', |
|
| 15 | + 'OCA\\Federation\\Controller\\SettingsController' => $baseDir.'/../lib/Controller/SettingsController.php', |
|
| 16 | + 'OCA\\Federation\\DAV\\FedAuth' => $baseDir.'/../lib/DAV/FedAuth.php', |
|
| 17 | + 'OCA\\Federation\\DbHandler' => $baseDir.'/../lib/DbHandler.php', |
|
| 18 | + 'OCA\\Federation\\Listener\\SabrePluginAuthInitListener' => $baseDir.'/../lib/Listener/SabrePluginAuthInitListener.php', |
|
| 19 | + 'OCA\\Federation\\Middleware\\AddServerMiddleware' => $baseDir.'/../lib/Middleware/AddServerMiddleware.php', |
|
| 20 | + 'OCA\\Federation\\Migration\\Version1010Date20200630191302' => $baseDir.'/../lib/Migration/Version1010Date20200630191302.php', |
|
| 21 | + 'OCA\\Federation\\Settings\\Admin' => $baseDir.'/../lib/Settings/Admin.php', |
|
| 22 | + 'OCA\\Federation\\SyncFederationAddressBooks' => $baseDir.'/../lib/SyncFederationAddressBooks.php', |
|
| 23 | + 'OCA\\Federation\\SyncJob' => $baseDir.'/../lib/SyncJob.php', |
|
| 24 | + 'OCA\\Federation\\TrustedServers' => $baseDir.'/../lib/TrustedServers.php', |
|
| 25 | 25 | ); |