Is there a way to configure Django Rest Framework to store token information in Redis and not in a database?

Is there a way to configure Django Rest Framework to store token information in Redis and not in a database?

+3
django django-rest-framework oauth-2.0 redis


source to share


1 answer


You can create your own custom authentication server that stores tokens in redis. From the documentation :



To implement a custom authentication scheme, subclass BaseAuthentication and override the .authenticate (self, request) method. The method should return binary (user, auth) if authentication succeeded, or None otherwise.

+3


source to share







All Articles
Loading...
X
Show
Funny
Dev
Pics