Django OAuth Toolkit protected_resource for class-based views

492 views Asked by At

I want to use @protected_resource() decorator with class-based views.

But I get error: 'update_card' object has no attribute 'get_full_path'

In documentation Class-based views page is empty https://django-oauth-toolkit.readthedocs.org/en/latest/views/class_based.html

How I can protect my class-based view with decorator?

1

There are 1 answers

0
Zulfugar Ismayilzadeh On

I've found solution myself:

Instead of django.views.generic.View I used oauth2_provider.views.generic.ProtectedResourceView.