Use discourse for SSO in a non-web app?

Looking in another thread I saw this post:

https://meta.discourse.org/t/registration-process-or-linking-to-other-db/29537/16

This suggests that I can simply HTTP POST a username/password combo to discourse and it will respond appropriately – is there any documentation on this anywhere, or examples?