fix: 修复对话校验错误 (#1432)
This commit is contained in:
parent
0440d68bf2
commit
aeef9c7714
@ -376,8 +376,7 @@ class ApplicationSerializer(serializers.Serializer):
|
|||||||
if token_details is not None and 'client_id' in token_details and token_details.get(
|
if token_details is not None and 'client_id' in token_details and token_details.get(
|
||||||
'client_id') is not None:
|
'client_id') is not None:
|
||||||
client_id = token_details.get('client_id')
|
client_id = token_details.get('client_id')
|
||||||
authentication = {'type': token_details.get('type'),
|
authentication = token_details.get('authentication', {})
|
||||||
'value': token_details.get('value')}
|
|
||||||
else:
|
else:
|
||||||
client_id = str(uuid.uuid1())
|
client_id = str(uuid.uuid1())
|
||||||
if authentication_value is not None:
|
if authentication_value is not None:
|
||||||
@ -389,8 +388,8 @@ class ApplicationSerializer(serializers.Serializer):
|
|||||||
'user_id': str(application_access_token.application.user.id),
|
'user_id': str(application_access_token.application.user.id),
|
||||||
'access_token': application_access_token.access_token,
|
'access_token': application_access_token.access_token,
|
||||||
'type': AuthenticationType.APPLICATION_ACCESS_TOKEN.value,
|
'type': AuthenticationType.APPLICATION_ACCESS_TOKEN.value,
|
||||||
'client_id': client_id
|
'client_id': client_id,
|
||||||
, **authentication})
|
'authentication': authentication})
|
||||||
return token
|
return token
|
||||||
else:
|
else:
|
||||||
raise NotFound404(404, "无效的access_token")
|
raise NotFound404(404, "无效的access_token")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user