Website generation with Couscous

This commit is contained in:
Milos Stojanovic
2020-05-17 10:45:42 +02:00
parent 61352f3054
commit daeb41f4ad
2 changed files with 5 additions and 8 deletions

View File

@@ -170,8 +170,7 @@ VALUES
],
],</code></pre>
<h2 id="configuring-auth-service-to-use-wordpress">Configuring Auth service to use WordPress</h2>
<p>This adapter allows WordPress users to use FileGator.</p>
<p>Replace your current Auth handler in <code>configuration.php</code> file with this:</p>
<p>Replace your current Auth handler in <code>configuration.php</code> file like this:</p>
<pre><code> 'Filegator\Services\Auth\AuthInterface' =&gt; [
'handler' =&gt; '\Filegator\Services\Auth\Adapters\WPAuth',
'config' =&gt; [
@@ -186,14 +185,12 @@ VALUES
<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>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>
<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' =&gt; [
...
'guest_redirection' =&gt; 'http://example.com/wp-admin/',
...
]</code></pre>
<p>Note: If your blog and FileGator are not on the same domain or subdomain, you have to customize cookie domain in wp-config.php</p>
<pre><code>define('COOKIE_DOMAIN', '.domain.com')</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>
<h2 id="api-authentication">API authentication</h2>

View File

@@ -136,7 +136,7 @@
<h2 id="download-precompiled-build">Download precompiled build</h2>
<p>Precompiled build is created for non-developers. In this version, the frontend (html, css and javascript) is compiled for you and the source code is removed so the final archive contains only minimum files.</p>
<ul>
<li>Download: <a href="https://github.com/filegator/static/raw/master/builds/filegator_v7.4.0.zip">v7.4.0</a></li>
<li>Download: <a href="https://github.com/filegator/static/raw/master/builds/filegator_v7.4.1.zip">v7.4.1</a></li>
<li>Unzip files and upload them to your PHP server</li>
<li>Make sure your webserver can read and write to <code>filegator/repository/</code> and <code>filegator/private/</code> folders</li>
<li>Set the website document root to <code>filegator/dist/</code> directory. This is also known as 'public' folder</li>
@@ -151,8 +151,8 @@
apt install -y wget unzip php apache2 libapache2-mod-php php-zip
cd /var/www/
wget https://github.com/filegator/static/raw/master/builds/filegator_v7.4.0.zip
unzip filegator_v7.4.0.zip &amp;&amp; rm filegator_v7.4.0.zip
wget https://github.com/filegator/static/raw/master/builds/filegator_v7.4.1.zip
unzip filegator_v7.4.1.zip &amp;&amp; rm filegator_v7.4.1.zip
chown -R www-data:www-data filegator/
chmod -R 775 filegator/