@@ -29,39 +29,39 @@ |
||
29 | 29 | |
30 | 30 | class WatcherConnector { |
31 | 31 | |
32 | - /** @var IRootFolder */ |
|
33 | - private $root; |
|
32 | + /** @var IRootFolder */ |
|
33 | + private $root; |
|
34 | 34 | |
35 | - /** @var SystemConfig */ |
|
36 | - private $config; |
|
35 | + /** @var SystemConfig */ |
|
36 | + private $config; |
|
37 | 37 | |
38 | - /** |
|
39 | - * WatcherConnector constructor. |
|
40 | - * |
|
41 | - * @param IRootFolder $root |
|
42 | - * @param SystemConfig $config |
|
43 | - */ |
|
44 | - public function __construct(IRootFolder $root, |
|
45 | - SystemConfig $config) { |
|
46 | - $this->root = $root; |
|
47 | - $this->config = $config; |
|
48 | - } |
|
38 | + /** |
|
39 | + * WatcherConnector constructor. |
|
40 | + * |
|
41 | + * @param IRootFolder $root |
|
42 | + * @param SystemConfig $config |
|
43 | + */ |
|
44 | + public function __construct(IRootFolder $root, |
|
45 | + SystemConfig $config) { |
|
46 | + $this->root = $root; |
|
47 | + $this->config = $config; |
|
48 | + } |
|
49 | 49 | |
50 | - /** |
|
51 | - * @return Watcher |
|
52 | - */ |
|
53 | - private function getWatcher(): Watcher { |
|
54 | - return \OC::$server->query(Watcher::class); |
|
55 | - } |
|
50 | + /** |
|
51 | + * @return Watcher |
|
52 | + */ |
|
53 | + private function getWatcher(): Watcher { |
|
54 | + return \OC::$server->query(Watcher::class); |
|
55 | + } |
|
56 | 56 | |
57 | - public function connectWatcher() { |
|
58 | - // Do not connect if we are not setup yet! |
|
59 | - if ($this->config->getValue('instanceid', null) !== null) { |
|
60 | - $this->root->listen('\OC\Files', 'postWrite', function (Node $node) { |
|
61 | - $this->getWatcher()->postWrite($node); |
|
62 | - }); |
|
57 | + public function connectWatcher() { |
|
58 | + // Do not connect if we are not setup yet! |
|
59 | + if ($this->config->getValue('instanceid', null) !== null) { |
|
60 | + $this->root->listen('\OC\Files', 'postWrite', function (Node $node) { |
|
61 | + $this->getWatcher()->postWrite($node); |
|
62 | + }); |
|
63 | 63 | |
64 | - \OC_Hook::connect('\OCP\Versions', 'rollback', $this->getWatcher(), 'versionRollback'); |
|
65 | - } |
|
66 | - } |
|
64 | + \OC_Hook::connect('\OCP\Versions', 'rollback', $this->getWatcher(), 'versionRollback'); |
|
65 | + } |
|
66 | + } |
|
67 | 67 | } |
@@ -29,8 +29,8 @@ |
||
29 | 29 | */ |
30 | 30 | interface ICountDisabledInGroup { |
31 | 31 | |
32 | - /** |
|
33 | - * @since 14.0.0 |
|
34 | - */ |
|
35 | - public function countDisabledInGroup(string $gid): int; |
|
32 | + /** |
|
33 | + * @since 14.0.0 |
|
34 | + */ |
|
35 | + public function countDisabledInGroup(string $gid): int; |
|
36 | 36 | } |
@@ -29,28 +29,28 @@ |
||
29 | 29 | |
30 | 30 | class Version14000Date20180516101403 extends SimpleMigrationStep { |
31 | 31 | |
32 | - /** |
|
33 | - * @param IOutput $output |
|
34 | - * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
35 | - * @param array $options |
|
36 | - * @return null|ISchemaWrapper |
|
37 | - */ |
|
38 | - public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { |
|
39 | - /** @var ISchemaWrapper $schema */ |
|
40 | - $schema = $schemaClosure(); |
|
32 | + /** |
|
33 | + * @param IOutput $output |
|
34 | + * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
35 | + * @param array $options |
|
36 | + * @return null|ISchemaWrapper |
|
37 | + */ |
|
38 | + public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { |
|
39 | + /** @var ISchemaWrapper $schema */ |
|
40 | + $schema = $schemaClosure(); |
|
41 | 41 | |
42 | - $table = $schema->getTable('authtoken'); |
|
42 | + $table = $schema->getTable('authtoken'); |
|
43 | 43 | |
44 | - if (!$table->hasColumn('expires')) { |
|
45 | - $table->addColumn('expires', 'integer', [ |
|
46 | - 'notnull' => false, |
|
47 | - 'length' => 4, |
|
48 | - 'default' => null, |
|
49 | - 'unsigned' => true, |
|
50 | - ]); |
|
44 | + if (!$table->hasColumn('expires')) { |
|
45 | + $table->addColumn('expires', 'integer', [ |
|
46 | + 'notnull' => false, |
|
47 | + 'length' => 4, |
|
48 | + 'default' => null, |
|
49 | + 'unsigned' => true, |
|
50 | + ]); |
|
51 | 51 | |
52 | - return $schema; |
|
53 | - } |
|
54 | - return null; |
|
55 | - } |
|
52 | + return $schema; |
|
53 | + } |
|
54 | + return null; |
|
55 | + } |
|
56 | 56 | } |
@@ -25,10 +25,10 @@ |
||
25 | 25 | use OCP\IL10N; |
26 | 26 | |
27 | 27 | class KerberosAuth extends AuthMechanism { |
28 | - public function __construct(IL10N $l) { |
|
29 | - $this |
|
30 | - ->setIdentifier('smb::kerberos') |
|
31 | - ->setScheme(self::SCHEME_SMB) |
|
32 | - ->setText($l->t('Kerberos ticket')); |
|
33 | - } |
|
28 | + public function __construct(IL10N $l) { |
|
29 | + $this |
|
30 | + ->setIdentifier('smb::kerberos') |
|
31 | + ->setScheme(self::SCHEME_SMB) |
|
32 | + ->setText($l->t('Kerberos ticket')); |
|
33 | + } |
|
34 | 34 | } |
@@ -27,37 +27,37 @@ |
||
27 | 27 | |
28 | 28 | class CloudFederationFactory implements ICloudFederationFactory { |
29 | 29 | |
30 | - /** |
|
31 | - * get a CloudFederationShare Object to prepare a share you want to send |
|
32 | - * |
|
33 | - * @param string $shareWith |
|
34 | - * @param string $name resource name (e.g. document.odt) |
|
35 | - * @param string $description share description (optional) |
|
36 | - * @param string $providerId resource UID on the provider side |
|
37 | - * @param string $owner provider specific UID of the user who owns the resource |
|
38 | - * @param string $ownerDisplayName display name of the user who shared the item |
|
39 | - * @param string $sharedBy provider specific UID of the user who shared the resource |
|
40 | - * @param string $sharedByDisplayName display name of the user who shared the resource |
|
41 | - * @param string $sharedSecret used to authenticate requests across servers |
|
42 | - * @param string $shareType ('group' or 'user' share) |
|
43 | - * @param $resourceType ('file', 'calendar',...) |
|
44 | - * @return ICloudFederationShare |
|
45 | - * |
|
46 | - * @since 14.0.0 |
|
47 | - */ |
|
48 | - public function getCloudFederationShare($shareWith, $name, $description, $providerId, $owner, $ownerDisplayName, $sharedBy, $sharedByDisplayName, $sharedSecret, $shareType, $resourceType) { |
|
49 | - return new CloudFederationShare($shareWith, $name, $description, $providerId, $owner, $ownerDisplayName, $sharedBy, $sharedByDisplayName, $shareType, $resourceType, $sharedSecret); |
|
50 | - } |
|
30 | + /** |
|
31 | + * get a CloudFederationShare Object to prepare a share you want to send |
|
32 | + * |
|
33 | + * @param string $shareWith |
|
34 | + * @param string $name resource name (e.g. document.odt) |
|
35 | + * @param string $description share description (optional) |
|
36 | + * @param string $providerId resource UID on the provider side |
|
37 | + * @param string $owner provider specific UID of the user who owns the resource |
|
38 | + * @param string $ownerDisplayName display name of the user who shared the item |
|
39 | + * @param string $sharedBy provider specific UID of the user who shared the resource |
|
40 | + * @param string $sharedByDisplayName display name of the user who shared the resource |
|
41 | + * @param string $sharedSecret used to authenticate requests across servers |
|
42 | + * @param string $shareType ('group' or 'user' share) |
|
43 | + * @param $resourceType ('file', 'calendar',...) |
|
44 | + * @return ICloudFederationShare |
|
45 | + * |
|
46 | + * @since 14.0.0 |
|
47 | + */ |
|
48 | + public function getCloudFederationShare($shareWith, $name, $description, $providerId, $owner, $ownerDisplayName, $sharedBy, $sharedByDisplayName, $sharedSecret, $shareType, $resourceType) { |
|
49 | + return new CloudFederationShare($shareWith, $name, $description, $providerId, $owner, $ownerDisplayName, $sharedBy, $sharedByDisplayName, $shareType, $resourceType, $sharedSecret); |
|
50 | + } |
|
51 | 51 | |
52 | - /** |
|
53 | - * get a Cloud FederationNotification object to prepare a notification you |
|
54 | - * want to send |
|
55 | - * |
|
56 | - * @return ICloudFederationNotification |
|
57 | - * |
|
58 | - * @since 14.0.0 |
|
59 | - */ |
|
60 | - public function getCloudFederationNotification() { |
|
61 | - return new CloudFederationNotification(); |
|
62 | - } |
|
52 | + /** |
|
53 | + * get a Cloud FederationNotification object to prepare a notification you |
|
54 | + * want to send |
|
55 | + * |
|
56 | + * @return ICloudFederationNotification |
|
57 | + * |
|
58 | + * @since 14.0.0 |
|
59 | + */ |
|
60 | + public function getCloudFederationNotification() { |
|
61 | + return new CloudFederationNotification(); |
|
62 | + } |
|
63 | 63 | } |
@@ -29,52 +29,52 @@ |
||
29 | 29 | * @since 13.0.0 |
30 | 30 | */ |
31 | 31 | abstract class SimpleMigrationStep implements IMigrationStep { |
32 | - /** |
|
33 | - * Human readable name of the migration step |
|
34 | - * |
|
35 | - * @return string |
|
36 | - * @since 14.0.0 |
|
37 | - */ |
|
38 | - public function name(): string { |
|
39 | - return ''; |
|
40 | - } |
|
32 | + /** |
|
33 | + * Human readable name of the migration step |
|
34 | + * |
|
35 | + * @return string |
|
36 | + * @since 14.0.0 |
|
37 | + */ |
|
38 | + public function name(): string { |
|
39 | + return ''; |
|
40 | + } |
|
41 | 41 | |
42 | - /** |
|
43 | - * Human readable description of the migration step |
|
44 | - * |
|
45 | - * @return string |
|
46 | - * @since 14.0.0 |
|
47 | - */ |
|
48 | - public function description(): string { |
|
49 | - return ''; |
|
50 | - } |
|
42 | + /** |
|
43 | + * Human readable description of the migration step |
|
44 | + * |
|
45 | + * @return string |
|
46 | + * @since 14.0.0 |
|
47 | + */ |
|
48 | + public function description(): string { |
|
49 | + return ''; |
|
50 | + } |
|
51 | 51 | |
52 | - /** |
|
53 | - * @param IOutput $output |
|
54 | - * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
55 | - * @param array $options |
|
56 | - * @since 13.0.0 |
|
57 | - */ |
|
58 | - public function preSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) { |
|
59 | - } |
|
52 | + /** |
|
53 | + * @param IOutput $output |
|
54 | + * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
55 | + * @param array $options |
|
56 | + * @since 13.0.0 |
|
57 | + */ |
|
58 | + public function preSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) { |
|
59 | + } |
|
60 | 60 | |
61 | - /** |
|
62 | - * @param IOutput $output |
|
63 | - * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
64 | - * @param array $options |
|
65 | - * @return null|ISchemaWrapper |
|
66 | - * @since 13.0.0 |
|
67 | - */ |
|
68 | - public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { |
|
69 | - return null; |
|
70 | - } |
|
61 | + /** |
|
62 | + * @param IOutput $output |
|
63 | + * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
64 | + * @param array $options |
|
65 | + * @return null|ISchemaWrapper |
|
66 | + * @since 13.0.0 |
|
67 | + */ |
|
68 | + public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { |
|
69 | + return null; |
|
70 | + } |
|
71 | 71 | |
72 | - /** |
|
73 | - * @param IOutput $output |
|
74 | - * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
75 | - * @param array $options |
|
76 | - * @since 13.0.0 |
|
77 | - */ |
|
78 | - public function postSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) { |
|
79 | - } |
|
72 | + /** |
|
73 | + * @param IOutput $output |
|
74 | + * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
75 | + * @param array $options |
|
76 | + * @since 13.0.0 |
|
77 | + */ |
|
78 | + public function postSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) { |
|
79 | + } |
|
80 | 80 | } |
@@ -38,75 +38,75 @@ |
||
38 | 38 | use OCP\Settings\ISettings; |
39 | 39 | |
40 | 40 | class Admin implements ISettings { |
41 | - /** @var IConfig */ |
|
42 | - private $config; |
|
43 | - /** @var IL10N */ |
|
44 | - private $l; |
|
45 | - /** @var ThemingDefaults */ |
|
46 | - private $themingDefaults; |
|
47 | - /** @var IURLGenerator */ |
|
48 | - private $urlGenerator; |
|
49 | - /** @var ImageManager */ |
|
50 | - private $imageManager; |
|
41 | + /** @var IConfig */ |
|
42 | + private $config; |
|
43 | + /** @var IL10N */ |
|
44 | + private $l; |
|
45 | + /** @var ThemingDefaults */ |
|
46 | + private $themingDefaults; |
|
47 | + /** @var IURLGenerator */ |
|
48 | + private $urlGenerator; |
|
49 | + /** @var ImageManager */ |
|
50 | + private $imageManager; |
|
51 | 51 | |
52 | - public function __construct(IConfig $config, |
|
53 | - IL10N $l, |
|
54 | - ThemingDefaults $themingDefaults, |
|
55 | - IURLGenerator $urlGenerator, |
|
56 | - ImageManager $imageManager) { |
|
57 | - $this->config = $config; |
|
58 | - $this->l = $l; |
|
59 | - $this->themingDefaults = $themingDefaults; |
|
60 | - $this->urlGenerator = $urlGenerator; |
|
61 | - $this->imageManager = $imageManager; |
|
62 | - } |
|
52 | + public function __construct(IConfig $config, |
|
53 | + IL10N $l, |
|
54 | + ThemingDefaults $themingDefaults, |
|
55 | + IURLGenerator $urlGenerator, |
|
56 | + ImageManager $imageManager) { |
|
57 | + $this->config = $config; |
|
58 | + $this->l = $l; |
|
59 | + $this->themingDefaults = $themingDefaults; |
|
60 | + $this->urlGenerator = $urlGenerator; |
|
61 | + $this->imageManager = $imageManager; |
|
62 | + } |
|
63 | 63 | |
64 | - /** |
|
65 | - * @return TemplateResponse |
|
66 | - */ |
|
67 | - public function getForm(): TemplateResponse { |
|
68 | - $themable = true; |
|
69 | - $errorMessage = ''; |
|
70 | - $theme = $this->config->getSystemValue('theme', ''); |
|
71 | - if ($theme !== '') { |
|
72 | - $themable = false; |
|
73 | - $errorMessage = $this->l->t('You are already using a custom theme. Theming app settings might be overwritten by that.'); |
|
74 | - } |
|
64 | + /** |
|
65 | + * @return TemplateResponse |
|
66 | + */ |
|
67 | + public function getForm(): TemplateResponse { |
|
68 | + $themable = true; |
|
69 | + $errorMessage = ''; |
|
70 | + $theme = $this->config->getSystemValue('theme', ''); |
|
71 | + if ($theme !== '') { |
|
72 | + $themable = false; |
|
73 | + $errorMessage = $this->l->t('You are already using a custom theme. Theming app settings might be overwritten by that.'); |
|
74 | + } |
|
75 | 75 | |
76 | - $parameters = [ |
|
77 | - 'themable' => $themable, |
|
78 | - 'errorMessage' => $errorMessage, |
|
79 | - 'name' => $this->themingDefaults->getEntity(), |
|
80 | - 'url' => $this->themingDefaults->getBaseUrl(), |
|
81 | - 'slogan' => $this->themingDefaults->getSlogan(), |
|
82 | - 'color' => $this->themingDefaults->getColorPrimary(), |
|
83 | - 'uploadLogoRoute' => $this->urlGenerator->linkToRoute('theming.Theming.uploadImage'), |
|
84 | - 'canThemeIcons' => $this->imageManager->shouldReplaceIcons(), |
|
85 | - 'iconDocs' => $this->urlGenerator->linkToDocs('admin-theming-icons'), |
|
86 | - 'images' => $this->imageManager->getCustomImages(), |
|
87 | - 'imprintUrl' => $this->themingDefaults->getImprintUrl(), |
|
88 | - 'privacyUrl' => $this->themingDefaults->getPrivacyUrl(), |
|
89 | - ]; |
|
76 | + $parameters = [ |
|
77 | + 'themable' => $themable, |
|
78 | + 'errorMessage' => $errorMessage, |
|
79 | + 'name' => $this->themingDefaults->getEntity(), |
|
80 | + 'url' => $this->themingDefaults->getBaseUrl(), |
|
81 | + 'slogan' => $this->themingDefaults->getSlogan(), |
|
82 | + 'color' => $this->themingDefaults->getColorPrimary(), |
|
83 | + 'uploadLogoRoute' => $this->urlGenerator->linkToRoute('theming.Theming.uploadImage'), |
|
84 | + 'canThemeIcons' => $this->imageManager->shouldReplaceIcons(), |
|
85 | + 'iconDocs' => $this->urlGenerator->linkToDocs('admin-theming-icons'), |
|
86 | + 'images' => $this->imageManager->getCustomImages(), |
|
87 | + 'imprintUrl' => $this->themingDefaults->getImprintUrl(), |
|
88 | + 'privacyUrl' => $this->themingDefaults->getPrivacyUrl(), |
|
89 | + ]; |
|
90 | 90 | |
91 | - return new TemplateResponse('theming', 'settings-admin', $parameters, ''); |
|
92 | - } |
|
91 | + return new TemplateResponse('theming', 'settings-admin', $parameters, ''); |
|
92 | + } |
|
93 | 93 | |
94 | - /** |
|
95 | - * @return string the section ID, e.g. 'sharing' |
|
96 | - */ |
|
97 | - public function getSection(): string { |
|
98 | - return 'theming'; |
|
99 | - } |
|
94 | + /** |
|
95 | + * @return string the section ID, e.g. 'sharing' |
|
96 | + */ |
|
97 | + public function getSection(): string { |
|
98 | + return 'theming'; |
|
99 | + } |
|
100 | 100 | |
101 | - /** |
|
102 | - * @return int whether the form should be rather on the top or bottom of |
|
103 | - * the admin section. The forms are arranged in ascending order of the |
|
104 | - * priority values. It is required to return a value between 0 and 100. |
|
105 | - * |
|
106 | - * E.g.: 70 |
|
107 | - */ |
|
108 | - public function getPriority(): int { |
|
109 | - return 5; |
|
110 | - } |
|
101 | + /** |
|
102 | + * @return int whether the form should be rather on the top or bottom of |
|
103 | + * the admin section. The forms are arranged in ascending order of the |
|
104 | + * priority values. It is required to return a value between 0 and 100. |
|
105 | + * |
|
106 | + * E.g.: 70 |
|
107 | + */ |
|
108 | + public function getPriority(): int { |
|
109 | + return 5; |
|
110 | + } |
|
111 | 111 | |
112 | 112 | } |
@@ -33,17 +33,17 @@ |
||
33 | 33 | * @since 14.0.0 |
34 | 34 | */ |
35 | 35 | interface ILogFactory { |
36 | - /** |
|
37 | - * @param string $type - one of: file, errorlog, syslog, systemd |
|
38 | - * @return IWriter |
|
39 | - * @since 14.0.0 |
|
40 | - */ |
|
41 | - public function get(string $type): IWriter; |
|
36 | + /** |
|
37 | + * @param string $type - one of: file, errorlog, syslog, systemd |
|
38 | + * @return IWriter |
|
39 | + * @since 14.0.0 |
|
40 | + */ |
|
41 | + public function get(string $type): IWriter; |
|
42 | 42 | |
43 | - /** |
|
44 | - * @param string $path |
|
45 | - * @return ILogger |
|
46 | - * @since 14.0.0 |
|
47 | - */ |
|
48 | - public function getCustomLogger(string $path): ILogger; |
|
43 | + /** |
|
44 | + * @param string $path |
|
45 | + * @return ILogger |
|
46 | + * @since 14.0.0 |
|
47 | + */ |
|
48 | + public function getCustomLogger(string $path): ILogger; |
|
49 | 49 | } |
@@ -35,31 +35,31 @@ |
||
35 | 35 | */ |
36 | 36 | class RSAPrivateKey extends AuthMechanism { |
37 | 37 | |
38 | - /** @var IConfig */ |
|
39 | - private $config; |
|
38 | + /** @var IConfig */ |
|
39 | + private $config; |
|
40 | 40 | |
41 | - public function __construct(IL10N $l, IConfig $config) { |
|
42 | - $this->config = $config; |
|
41 | + public function __construct(IL10N $l, IConfig $config) { |
|
42 | + $this->config = $config; |
|
43 | 43 | |
44 | - $this |
|
45 | - ->setIdentifier('publickey::rsa_private') |
|
46 | - ->setScheme(self::SCHEME_PUBLICKEY) |
|
47 | - ->setText($l->t('RSA private key')) |
|
48 | - ->addParameters([ |
|
49 | - new DefinitionParameter('user', $l->t('Username')), |
|
50 | - (new DefinitionParameter('password', $l->t('Password'))) |
|
51 | - ->setFlag(DefinitionParameter::FLAG_OPTIONAL) |
|
52 | - ->setType(DefinitionParameter::VALUE_PASSWORD), |
|
53 | - new DefinitionParameter('private_key', $l->t('Private key')), |
|
54 | - ]); |
|
55 | - } |
|
44 | + $this |
|
45 | + ->setIdentifier('publickey::rsa_private') |
|
46 | + ->setScheme(self::SCHEME_PUBLICKEY) |
|
47 | + ->setText($l->t('RSA private key')) |
|
48 | + ->addParameters([ |
|
49 | + new DefinitionParameter('user', $l->t('Username')), |
|
50 | + (new DefinitionParameter('password', $l->t('Password'))) |
|
51 | + ->setFlag(DefinitionParameter::FLAG_OPTIONAL) |
|
52 | + ->setType(DefinitionParameter::VALUE_PASSWORD), |
|
53 | + new DefinitionParameter('private_key', $l->t('Private key')), |
|
54 | + ]); |
|
55 | + } |
|
56 | 56 | |
57 | - public function manipulateStorageConfig(StorageConfig &$storage, IUser $user = null) { |
|
58 | - $auth = new RSACrypt(); |
|
59 | - $auth->setPassword($this->config->getSystemValue('secret', '')); |
|
60 | - if (!$auth->loadKey($storage->getBackendOption('private_key'))) { |
|
61 | - throw new \RuntimeException('unable to load private key'); |
|
62 | - } |
|
63 | - $storage->setBackendOption('public_key_auth', $auth); |
|
64 | - } |
|
57 | + public function manipulateStorageConfig(StorageConfig &$storage, IUser $user = null) { |
|
58 | + $auth = new RSACrypt(); |
|
59 | + $auth->setPassword($this->config->getSystemValue('secret', '')); |
|
60 | + if (!$auth->loadKey($storage->getBackendOption('private_key'))) { |
|
61 | + throw new \RuntimeException('unable to load private key'); |
|
62 | + } |
|
63 | + $storage->setBackendOption('public_key_auth', $auth); |
|
64 | + } |
|
65 | 65 | } |