Add support for oauth. Docs. Tests.