Use Discourse API to check whether username/password combination is valid

There is Use Discourse as an identity provider (SSO, DiscourseConnect).