Any code that can be hosted on a web server that wraps http requests can be implemented to support remote authentication.
https://github.com/Integrify/ExternalAuthExample