Пример #1
0
 def post(self, request, format=None):
     if has_two_factor_auth() and two_factor_auth_enabled(request.user):
         return {}
     randstr = gen_token(max_length=32)
     token = ClientLoginToken(randstr, request.user.username)
     token.save()
     return {'token': randstr}
Пример #2
0
 def post(self, request, format=None):
     if has_two_factor_auth() and two_factor_auth_enabled(request.user.username):
         return {}
     randstr = gen_token(max_length=32)
     token = ClientLoginToken(randstr, request.user.username)
     token.save()
     return {"token": randstr}
Пример #3
0
 def post(self, request, format=None):
     randstr = gen_token(max_length=32)
     token = ClientLoginToken(randstr, request.user.username)
     token.save()
     return {'token': randstr}
Пример #4
0
 def post(self, request, format=None):
     randstr = gen_token(max_length=32)
     token = ClientLoginToken(randstr, request.user.username)
     token.save()
     return {'token': randstr}