From 61352f305493877d45ff6e2c51cc69743c74da11 Mon Sep 17 00:00:00 2001 From: Milos Stojanovic Date: Sun, 10 May 2020 00:25:02 +0200 Subject: [PATCH] Website generation with Couscous --- configuration/auth.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/configuration/auth.html b/configuration/auth.html index 57f0f9d..c454a11 100644 --- a/configuration/auth.html +++ b/configuration/auth.html @@ -170,7 +170,8 @@ VALUES ], ],

Configuring Auth service to use WordPress

-

Replace your current Auth handler in configuration.php file like this:

+

This adapter allows WordPress users to use FileGator.

+

Replace your current Auth handler in configuration.php file with this:

        'Filegator\Services\Auth\AuthInterface' => [
             'handler' => '\Filegator\Services\Auth\Adapters\WPAuth',
             'config' => [
@@ -185,12 +186,14 @@ VALUES
 
  • permissions is the array of permissions given to each user
  • private_repos each user will have its own sub folder, admin will see everything (false/true)
  • -

    Note: With more recent versions of FileGator you can set guest_redirection in your configuration.php to redirect logged-out users back to your WP site:

    +

    With more recent versions of FileGator you can set guest_redirection in your configuration.php to redirect logged-out users back to your WP site:

    'frontend_config' => [
       ...
         'guest_redirection' => 'http://example.com/wp-admin/',
       ...
     ]
    +

    Note: If your blog and FileGator are not on the same domain or subdomain, you have to customize cookie domain in wp-config.php

    +
    define('COOKIE_DOMAIN', '.domain.com')

    Custom Authentication using 3rd party

    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 AuthInterface to connect those two. This new adapter will try to authenticate users in your application and translate each user into filegator User object.

    API authentication