jwt_authentication.py 336 B

1234567891011121314
  1. # -*- coding: utf-8 -*-
  2. from __future__ import unicode_literals
  3. from tastypie.authentication import Authentication
  4. class JWTAuthentication(Authentication):
  5. '''
  6. '''
  7. def is_authenticated(self, request, **kwargs):
  8. return True
  9. '''
  10. '''
  11. def get_identifier(self, request):
  12. return request.user.username