Skip to content

incorporate CachedOAuth2Validator improvement from LuizaLabs #1627

@n2ygk

Description

@n2ygk

Is your feature request related to a problem? Please describe.
In production operation with DRF/DJA using OAuth2Validator to validate Bearer Access Tokens (provided by an external AS) we've seen excessive SQL database lookups (one per API endpoint invocation) that are contributing unnecessary load to our database server. A typical user's Access Token can result in hundreds of closely-spaced REST API calls and the corresponding database AccessToken model queries.

Describe the solution you'd like
LuizaLabs has fixed this to use a cache as described here:

https://django-toolkit.readthedocs.io/en/stable/oauth2/

and implemented here:

https://github.com/luizalabs/django-toolkit/blob/master/django_toolkit/oauth2/validators.py

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions