python - How to get oauth2 client app from Django request -


i'm using oauth2_provider + rest_framework. have configured several client applications, , authenticate , receive access tokens.

i have client app in request (eg. request.client). perhaps should create kind of middleware, sets it, i'm not sure proper way it. or maybe functionality provided oauth2_provider/oauthlib, , have overlooked it?

the client should set when:

  • a valid access token provided
  • valid app credentials provided (like when requesting access token)

python v3.5.3, django v1.10.6

oauth2_provider accesstoken has foreign key application issued token

you can application form access token this: application = request.auth.application


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -