API Authentication

I am creating an application with an API whose responses are JSON based. What would be the correct way to authenticate the user?

I don't know about a core functionality that provides this.

This repo looks nice, although I've never used it: https://github.com/goors/phalcon-api-oauth2