Skip to content
 
 

Repository files navigation

This plugins implements an OpenID Connect autorization server for Galette. This allows registered members in a Galette instance to log into third party websites, which implement OpenID Connect or OAuth2 protocols, such as:

This plugin is mainly a derivative work from the great original Galette OAuth2 plugin written by Manuel Hervouet.

Setup

This project uses league/oauth2-server, nl.idaas/openid-server, symfony/yaml and hassankhan/config packages.

To automatically download these packages:

cd plugin-openidc
composer install

Configuration

Prepare public/private keys

cd plugin-openidc/config
openssl genrsa -out private.key 2048
openssl rsa -in private.key -pubout -out public.key
chmod 660 *.key

Configure a ClientEntity

Generate an encryption key, which will be used to encrypt tokens:

vendor/bin/generate-defuse-key

This will result in an hexadecimal string.

Rename config/config.yml.dist to config/config.yml and edit according to your third party application settings:

global:
    password: abc123
    encryption_key: def0123456789abcdef # put here the defused key generated above
galette_flarum:
    title: 'Forum Flarum'
    redirect_logout: 'http://192.168.1.99/flarum/public'
    options: teamonly
galette_nc:
    title: 'Nextcloud'
    redirect_logout: 'http://192.168.1.99/nextcloud'
    options: uptodate
galette_xxxxx:

Each third party client identifier must be prefixed by galette_, other prefixes will be rejected by the server.

The corresponding Flarum configuration:

Flarum configuration example

The corresponding NextCloud configuration:

Nextcloud configuration example

Available options :

  • teamonly : only staff members can login
  • uptodate : only uptodate members can login

Usage

Nextcloud - how add groups for a specific member

Edit a member : In info_adh field you can add a line with #GROUPS:group1;group2#

Example :

#GROUPS:accouting;home#

More information about OAuth2 Server

About

OpenID Connect plugin for Galette

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages