mirror of
https://github.com/filegator/filegator.git
synced 2025-08-05 20:57:28 +02:00
Website generation with Couscous
This commit is contained in:
@@ -169,9 +169,30 @@ VALUES
|
||||
'database' => 'filegator',
|
||||
],
|
||||
],</code></pre>
|
||||
<h2 id="custom-authentication-using-3rd-party-wordpress-or-similar">Custom Authentication using 3rd party (WordPress or similar)</h2>
|
||||
<h2 id="configuring-auth-service-to-use-wordpress">Configuring Auth service to use WordPress</h2>
|
||||
<p>Replace your current Auth handler in <code>configuration.php</code> file like this:</p>
|
||||
<pre><code> 'Filegator\Services\Auth\AuthInterface' => [
|
||||
'handler' => '\Filegator\Services\Auth\Adapters\WPAuth',
|
||||
'config' => [
|
||||
'wp_dir' => '/var/www/my_wordpress_site/',
|
||||
'permissions' => ['read', 'write', 'upload', 'download', 'batchdownload', 'zip'],
|
||||
'private_repos' => false,
|
||||
],
|
||||
],</code></pre>
|
||||
<p>Adjust in the config above:</p>
|
||||
<ul>
|
||||
<li><code>wp_dir</code> should be the directory path of your wordpress installation</li>
|
||||
<li><code>permissions</code> is the array of permissions given to each user</li>
|
||||
<li><code>private_repos</code> each user will have its own sub folder, admin will see everything (false/true)</li>
|
||||
</ul>
|
||||
<p>Note: With more recent versions of FileGator you can set <code>guest_redirection</code> in your <code>configuration.php</code> to redirect logged-out users back to your WP site:</p>
|
||||
<pre><code>'frontend_config' => [
|
||||
...
|
||||
'guest_redirection' => 'http://example.com/wp-admin/',
|
||||
...
|
||||
]</code></pre>
|
||||
<h2 id="custom-authentication-using-3rd-party">Custom Authentication using 3rd party</h2>
|
||||
<p>If you want to use FileGator as a part of another application, you probably already have users stored somewhere else. What you need in this case is to build a new custom Auth adapter that matches the <a href="https://github.com/filegator/filegator/blob/master/backend/Services/Auth/AuthInterface.php">AuthInterface</a> to connect those two. This new adapter will try to authenticate users in your application and translate each user into filegator <a href="https://github.com/filegator/filegator/blob/master/backend/Services/Auth/User.php">User</a> object.</p>
|
||||
<p>You can look at this simple <a href="https://github.com/filegator/wp_auth_adapter">WordPress auth adapter</a> to see how all this works.</p>
|
||||
<h2 id="api-authentication">API authentication</h2>
|
||||
<p>Front-end will use session based authentication to authenticate and consume the back-end.</p>
|
||||
<p>Note: The application will not work if you disable cookies.</p>
|
||||
|
@@ -144,6 +144,7 @@
|
||||
'default_archive_name' => 'archive.zip',
|
||||
'editable' => ['.txt', '.css', '.js', '.ts', '.html', '.php'],
|
||||
'date_format' => 'YY/MM/DD hh:mm:ss', // see: https://momentjs.com/docs/#/displaying/format/
|
||||
'guest_redirection' => '', // useful for external auth adapters
|
||||
],</code></pre>
|
||||
<h2 id="additional-html">Additional HTML</h2>
|
||||
<p>You can add additional html to the head and body like this:</p>
|
||||
|
@@ -145,7 +145,7 @@
|
||||
<h2 id="features-amp-goals">Features & Goals</h2>
|
||||
<ul>
|
||||
<li>Multiple storage adapters (Local, FTP, Amazon S3, Dropbox, DO Spaces, Azure Blob and many others via <a href="https://github.com/thephpleague/flysystem">Flysystem</a>)</li>
|
||||
<li>Multiple auth adapters with roles and permissions (Store users in json file or database)</li>
|
||||
<li>Multiple auth adapters with roles and permissions (Store users in json file, database or use WordPress)</li>
|
||||
<li>Multiple session adapters (Native File, Pdo, Redis, MongoDB, Memcached and others via <a href="https://github.com/symfony/symfony/tree/4.4/src/Symfony/Component/HttpFoundation/Session/Storage/Handler">Symfony</a>)</li>
|
||||
<li>Single page front-end (built with <a href="https://github.com/vuejs/vue">Vuejs</a>, <a href="https://github.com/jgthms/bulma">Bulma</a> and <a href="https://github.com/buefy/buefy">Buefy</a>)</li>
|
||||
<li>Chunked uploads (built with <a href="https://github.com/23/resumable.js">Resumable.js</a>)</li>
|
||||
|
Reference in New Issue
Block a user