Skip to content
This repository has been archived by the owner on Nov 11, 2018. It is now read-only.

A way to connect your Laravel 5 application into Vanilla Forum via jsConnect.

License

Notifications You must be signed in to change notification settings

reliqarts/laravel-vanilla-sso

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel-VanillaSSO

This package allows you to use jsConnect of Vanilla Forums in your Laravel 5 application and is a fork of pdefreitas/vanillasso.

Built For Laravel Build Status StyleCI License Latest Stable Version Latest Unstable Version

 

SSO (Single Sign-on) will save your time if you want to implement a forum on your Laravel 5 application.

The package is availabe on Packagist https://packagist.org/packages/reliqarts/vanillasso

Installation

  1. Install via composer; in console:

    composer require reliqarts/vanillasso
    

    or require in composer.json:

    {
        "require": {
            "reliqarts/vanillasso": "dev-master"
        }
    }

    then run composer update in your terminal to pull it in.

  2. Edit the providers array in app.php (app/config/app.php)

    'providers' => [
        // ...
        'ReliQArts\VanillaSSO\VanillaSSOServiceProvider',
        // ...
    ],
  3. Publish the vanillasso.php config file to make it accessible in app/config/packages/reliqarts/vanillasso/vanillasso.php

     php artisan config:publish reliqarts/vanillasso
    

Routes

An endpoint is automatically set based on your config. Default endpoint is: login/forum.

Configuration

You can directly edit config\vanillasso.php or add it to your application.

The configuration file looks like this:

return [
    // The string client ID that you set up in the jsConnect settings page.
    "client_id" => "",

    // The string secred that you set up in the jsConnect settings page.
    "secret" => "",

    // Endpoint
    "endpoint" => "",

    // User profile pic url.
    "profile_pic_url" => "http://mysite.dev/profile/pic/{user_id}",

    // Route related options.
    'routes' => [
        // Set the bindings for vanillasso
        'bindings' => [
            'middleware' => [
                'web',
                'auth',
            ]
        ]
    ],
];

Please note that this plugin supports MD5 and SHA1 hashes from JSconnect.

License

Check LICENSE for more information.

Credits

I want to thank Todd Burry from Vanilla Forums. This file helped producing this package: https://github.com/vanilla/jsConnectPHP/blob/master/functions.jsconnect.php

Trouble

If you use Vanilla 2.1 there is an annoying bug that you have to alter a table in order to jsConnect 1.4.1 be supported:

ALTER TABLE GDN_UserAuthenticationProvider ADD IsDefault BOOLEAN NOT NULL DEFAULT FALSE;

About

A way to connect your Laravel 5 application into Vanilla Forum via jsConnect.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%