This Craft 2.x plugin is no longer supported, but it is fully functional, and you may continue to use it as you see fit. The license also allows you to fork it and make changes as needed for legacy support reasons.
A simple plugin for integrating VanillaForums into Craft CMS websites, including Single Sign On (SSO) for site-wide SSO, as well as embedded SSO.
Installation
- Download & unzip the file and place the
vanillaforums
directory into yourcraft/plugins
directory - -OR- do a
git clone https://github.com/khalwat/vanillaforums.git
directly into yourcraft/plugins
folder. You can then update it withgit pull
- Install plugin in the Craft Control Panel under Settings > Plugins
- The plugin folder should be named
vanillaforums
for Craft to see it. GitHub recently started appending-master
(the branch name) to the name of the folder for zip file downloads.
-
Install jsConnect. Make sure you have installed the jsConnect plugin, and follow the documentation for Vanilla SSO setup.
-
jsConnect Auto SignIn. You might also consider installing and using the Vanilla jsConnect Auto SignIn plugin to make the SSO process smoother for the end user.
-
Go to your Vanillaforums AdminCP, under Users click on jsConnect, then click on Add Connection. Click on Generate Client ID and Secret to generate random Client ID and Secret fields, and then fill in the rest of the fields as appropriate
-
Next in the Craft Admin CP, go to Settings->Plugins->Vanillaforums and enter the same Client ID and Secret from step 3
Assuming you've set up everything properly, all you have to do for Site-Wide SSO is create a template in your CraftCMS that has only the following in it:
{{ vanillaforumsSSO() }}
This will generate a properly configured jsonp
response for the jsConnect SSO.
Then fill in the Authenticate Url field in your jsConnect connection with the URL to this template. You can test that it's working by clicking on the Test URL link under Users->jsConnect, it should look something like this:
test({"uniqueid":"1","name":"Admin","email":"admin@testsite.com","photourl":"http:\/\/testsite.com\/cpresources\/userphotos\/admin\/100\/profilepic.jpg?x=abF7BLdua","client_id":"12345678","signature":"b1670c794d13a5214b3d0ddd3d9a2293"})
Assuming you've set up everything properly, all you have to do for Embedded SSO (for things like blog comments, etc.) is to go to your VanillaForums AdminCP, click on Forum->Blog Comments->Universial Code and follow the instructions there.
You'll need to add a line after the var vanilla_identifier
that looks like this to enable SSO for embedded comments:
var vanilla_sso = '{{ vanillaforumsSSOEmbed() }}'; // Your SSO string.
That will output an encoded string of characters that should look something like this:
eyJ1bmlxdWVpZCI6IjEiLCJuYW1lIjoiQWRtaW4iLCJlbWFpbCI6ImFuZHJld0BtZWdhbG9tYW5pYWMuY29tIiwicGhvdG91cmwiOiJodHRwOlwvXC9UYXN0eVN0YWtlcy5jb21cL2NwcmVzb3VyY2VzXC91c2VycGhvdG9zXC9hbmRyZXdAbWVnYWxvbWFuaWFjLmNvbVwvMTAwXC9mcmFua19sZy5qcGc/eD1LTVFrMWl0aDciLCJjbGllbnRfaWQiOiIxODY0MjUyMjMwIn0= da4d6c328a730a9c7096bdbd53d2a408f5a5958c 1438711686 hmacsha1
- Added support for Craft 2.5 new plugin features
- Initial release