kumar303 / hawkrest

Hawk HTTP Authorization for Django Rest Framework
BSD 3-Clause "New" or "Revised" License
19 stars 8 forks source link

How to handle django User authentication, REST Framework throttling, etc? #3

Closed kerin closed 7 years ago

kerin commented 9 years ago

As Hawkrest doesn't make use of django's User model, there seems to be no way to implement API permissions, throttling etc. as they all expect the presence of a User object on request.user. So at the minute it looks like I need to subclass HawkAuthentication to look up and return a User object, which means copy and pasting most of the authenticate() method.

Is there a recommended way of handling population of request.user? Or am I missing something generally?

kumar303 commented 8 years ago

Hi. A couple replies: