if you speak about something like oauth authentication ("Connect with Google" / "Connect with Facebook" are some of the most famous oauth implementartion) for web service:
recently Hubert shared a two-legged oauth 1.0 implementation which is a very interesting example of oauth authentication in the web service. I didn't look too much at it but it looks good.
I suppose we will be aiming for a three-legged Oauth 2.0 implementation in core. I hope for Moodle 2.4.