Gizra/restful — pull request #40 by mateu-aguilo-bosch (2014-05-23 14:51:35+00:00)
Title: Add the authentication provider initial structure

This is a rework of https://github.com/Gizra/restful/pull/37 into authentication providers.

I like verbosity when coding, this means that I'm OK on forcing devs to make a choice on the authentication method. This PR provides a `cookie_auth` provider, but defaults to anonymous user if the `restful` _CTools_ plugin does not specify a `authentication types` array. This is open to discussion.

All in all the summary is:

- There is an authentication manager in the `RestfulEntityBase`.
- The manager knows about all the active authentication providers.
- You can ask the manager to identify the request and give you a user.
- Every provider implements `RestfulAuthenticationInterface`:
- `applies()`: to check wether authentication can be done.
- `authenticate()`: that gives you a user.
- The authentication providers are CTools plugins that provide a `class`. That class should implement `RestfulAuthenticationInterface` and can extend `RestfulAuthenticationBase`.

Follow ups:
1. https://github.com/Gizra/restful/issues/38
1. https://github.com/Gizra/restful/issues/39