parent
1e084d20f3
commit
05228943b4
@ -1,8 +1,18 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
|
<<<<<<< Updated upstream
|
||||||
|
=======
|
||||||
|
<<<<<<< Updated upstream
|
||||||
|
>>>>>>> Stashed changes
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.8 (2)" project-jdk-type="Python SDK" />
|
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.8 (2)" project-jdk-type="Python SDK" />
|
||||||
=======
|
=======
|
||||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.7 (EduSystemServer)" project-jdk-type="Python SDK" />
|
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.7 (EduSystemServer)" project-jdk-type="Python SDK" />
|
||||||
>>>>>>> 7b09141c358f80dd8877b8665d0d55b629db72aa
|
>>>>>>> 7b09141c358f80dd8877b8665d0d55b629db72aa
|
||||||
|
<<<<<<< Updated upstream
|
||||||
|
=======
|
||||||
|
=======
|
||||||
|
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.7 (EduSystemServer)" project-jdk-type="Python SDK" />
|
||||||
|
>>>>>>> Stashed changes
|
||||||
|
>>>>>>> Stashed changes
|
||||||
</project>
|
</project>
|
@ -0,0 +1,16 @@
|
|||||||
|
|
||||||
|
|
||||||
|
def jwt_response_payload_handler(token, user=None, request=None, role=None):
|
||||||
|
|
||||||
|
if user.username:
|
||||||
|
name = user.username
|
||||||
|
else:
|
||||||
|
name = user.username
|
||||||
|
return {
|
||||||
|
"authenticated": True,
|
||||||
|
'id': user.id,
|
||||||
|
"role": role,
|
||||||
|
'name': name,
|
||||||
|
'username': user.username,
|
||||||
|
'token': token,
|
||||||
|
}
|
Binary file not shown.
Loading…
Reference in new issue