@oauth_required decorator cannot be parametrized

Issue #11 resolved
created an issue

The current implementation of the @oauth_required decorator does not allow parametrizing it, even though the source code suggests it would (eg, to add resource name)

In my fork, I've implemented a small tweak to allow the parameter: https://bitbucket.org/bborowin/django-oauth-plus/changeset/3ab50cdf10e9

Comments (2)

  1. MichaƂ Jaworski

    fixed in c052177

    @bborowin: used your idea as foundation but I still needed some trick to make argument fully optional. Now oauth_required can be used with and without resource name parameter:

    def some_view(request)
    def some_view(request)
    @oauth_required('resource name')
    def some_view(request)
  2. Log in to comment