I’ve put together a SimpleSAMLphp module for connecting to Discourse SSO: https://github.com/reswild/discourse
The code that does all the work is taken from cviebrock/discourse-php, so all I did was hook this up to a SimpleSAML authentication source. I haven’t tested it too much so far, but in theory it should work with any authentication source supported by SimpleSAMLphp, so SAML, Shibboleth, CAS, OpenID, OAuth, and many others. For more information, see https://simplesamlphp.org/.
This is the first SimpleSAMLphp module I’ve written, so any comments or suggestions are welcome.