jazzband / django-oauth-toolkit

OAuth2 goodies for the Djangonauts!
https://django-oauth-toolkit.readthedocs.io
Other
3.12k stars 792 forks source link

Add access token instance as a request field #133

Open masci opened 10 years ago

masci commented 10 years ago

At the moment, when using DRF the access token instance is added to the request object and users have access to the application instance and the client_id through: request.auth.application.client_id.

The same doesn't happen when users don't use DRF, and all that they have in the request object is the resource_owner field.

A token field should be added to request objects so that users can access application instance and then the client_id through request.token.application.client_id both when using DOT mixins for CBVs and DOT decorators for function based views.

AduchiMergen commented 9 years ago

:+1:

fboerman commented 5 years ago

so this is a long no updated issue but I was wondering if there was any progress on it? It would be really handy to have. Is there a workaround available? I was thinking about simply lifting the token from request.META

IvanAnishchuk commented 4 years ago

I'm looking at this and would like to check whether those fields are accessible and provide the info in discussion...

auvipy commented 2 years ago

I'm looking at this and would like to check whether those fields are accessible and provide the info in discussion...

can you give that a try?