This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from rest_framework.authentication import TokenAuthentication | |
from .models import MongoToken | |
from rest_framework import exceptions | |
class MongoTokenAuthentication(TokenAuthentication): | |
model = MongoToken | |
def authenticate_credentials(self, key): | |
try: |