How do I make discourse use my platform's autentication system?

We want discourse to be integrated with our platform. As soon as a user logs in to our platform, she should be logged into discourse. Can anybody point to some solutions for making this happen?

You may want this: