Skip to content

Commit

Permalink
Merge 8f90a12 into 6ba9a67
Browse files Browse the repository at this point in the history
  • Loading branch information
bernie-haxx committed May 15, 2019
2 parents 6ba9a67 + 8f90a12 commit 25e8168
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rest_social_auth/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,12 @@ class KnoxSerializer(TokenSerializer):
def get_token(self, obj):
try:
from knox.models import AuthToken
from knox.settings import knox_settings
except ImportError:
warnings.warn('django-rest-knox must be installed for Knox authentication', ImportWarning)
raise

token = AuthToken.objects.create(obj)
instance, token = AuthToken.objects.create(obj,knox_settings.TOKEN_TTL)
return token


Expand Down

0 comments on commit 25e8168

Please sign in to comment.