|
@@ -141,7 +141,7 @@ class oa2TokenView(TemplateView):
|
|
|
print(client_id)
|
|
|
user_qs = UserModel.objects.filter(code=code)
|
|
|
if user_qs.exists():
|
|
|
-
|
|
|
+
|
|
|
access_token = CommonService.encrypt_data(randomlength=32)
|
|
|
refresh_token = CommonService.encrypt_data(randomlength=32)
|
|
|
|
|
@@ -152,9 +152,12 @@ class oa2TokenView(TemplateView):
|
|
|
"expires_in": 3600,
|
|
|
"refresh_token": refresh_token
|
|
|
}
|
|
|
+ print(res_json)
|
|
|
return JsonResponse(res_json)
|
|
|
else:
|
|
|
- return JsonResponse({'msg': 'code not exists'})
|
|
|
+ res_json={'msg': 'code not exists'}
|
|
|
+ print(res_json)
|
|
|
+ return JsonResponse(res_json)
|
|
|
|
|
|
|
|
|
class oa2RtspStartView(TemplateView):
|