Discourse SSO via a SimpleSAMLphp authentication module (IdP)

Hi :wave:, I wrote this SimpleSAMLphp authentication module to be able to use Discourse as an SSO provider within a SimpleSAMLphp installation. I.e. you can use Discourse as an SSO provider for any services that supports SAML or Shibboleth authentication, which is really nice.

https://github.com/swcc/simplesamlphp-module-authdiscourse

Let me know what you think (if interested to comment on the code you can use Github Issues) :slightly_smiling_face:

5 Likes

@paulrbr , any chance you could help me get this thing installed? Composer is killing me. First time I’ve ever tried to use it. I’ve got simplesamlphp installed just fine and I’ve been able to install other modules using composer, but for the life of me I can’t get this one to go.

I keep getting:
[InvalidArgumentException]
Could not find a matching version of package swcc/simplesamlphp-module-authdiscourse. Check the package spelling, your version constraint and that the pa
ckage is available in a stability which matches your minimum-stability (stable).

Looking forward to giving this a try. My goal is to use it to bridge my rocket chat server to discourse.

I’ve gotten much further, but now I’m stuck at the config.php and authsources.php. I’ve made setting changes in config.php that were necessary for the install itself. I also enabled the module inside the config.php.

I’m really at a loss for exactly what to do in the authsources.php file to fully configure this.

@paulrbr Any chance you can show an example?

Hi @ninermac,

Thanks for trying out this module!

Sorry about the confusion with usingit with composer, I had forgot to publish the package on packagist.org that is why you had difficulties to fetch it I guess. I fixed that and the module is now available:

https://packagist.org/packages/swcc/simplesamlphp-module-authdiscourse

About the authsources.php simplesamlphp configuration example, I added an concrete example in the README of the module:

https://github.com/swcc/simplesamlphp-module-authdiscourse#using-the-discourse-authentication-source-with-simplesamlphp

I hope it helps, let me know if you managed to use it. Thanks!

Thanks. I’ll give it a shot. Yeah, I had to play around with my composer setup for a while before I could get it to pull from GitHub.

Thanks for your module! I wrote a Configuration Guide so that people know how to config SimpleSAMLphp and your module. Thanks for your contribution!

3 Likes

I really appreciate this actually, I looked at this maybe two days ago and was like yeah, this looks useful but, I don’t even know how to get started lol. I’m giving it a read right now. :slight_smile:

1 Like