thephpleague/oauth2-server — pull request #178 by shadowhand (2014-05-31 22:35:22+00:00)
Title: Resource server errors

Copies helper methods for exception handling from the Authorization server into the Resource server to allow for implementing [RFC 6750, section 3.1](http://tools.ietf.org/html/rfc6750#section-3.1):

- getExceptionType
- getExceptionMessage
- getExceptionHttpHeaders

Adds `$required` parameter to `hasScope` to trigger exceptions when scopes are missing from the session.

Adds two new exceptions, `MissingAccessToken` and `InsufficientScope` to differentiate between the different error responses from the resource server.

Tests updated and new tests written to complete code coverage.