caffeinehit/django-oauth2-provider — pull request #6 by tomchristie (2012-10-26 14:41:56+00:00)
Title: Add AccessToken.has_scope()

Adding this method helps decouple the API concerns from the implementation concerns.

Example:

A reusable REST framework TokenHasRequiredScope() class can be implemented which supports django-oauth2-provider, but is not coupled to it's implementation.
Including the string-or-integer behavior is also required, since the scope constants are particular to django-oauth2-provider.