You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def my_jwt_response_msg(token, user=None, request=None):
|
|
|
|
|
"""
|
|
|
|
|
自定义JWT响应的数据格式,默认只有token。
|
|
|
|
|
:param token:
|
|
|
|
|
:param user:
|
|
|
|
|
:param request:
|
|
|
|
|
:return:
|
|
|
|
|
"""
|
|
|
|
|
return {
|
|
|
|
|
'token': token,
|
|
|
|
|
'user_id': user.id,
|
|
|
|
|
'user_name': user.username,
|
|
|
|
|
}
|
|
|
|
|
|