自定义OAuth

how do I connect my API to discourse using OAuth