【发布时间】:2023-03-12 14:17:01
【问题描述】:
我正在使用这个库:https://hawkrest.readthedocs.io/en/latest/
在我的settings.py:
REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': (
'hawkrest.HawkAuthentication',
),
'DEFAULT_PERMISSION_CLASSES': (
'rest_framework.permissions.IsAuthenticated',
),
}
HAWK_CREDENTIALS = {
'script-user': {
'id': 'script-user',
'key': 'aabbcc',
'algorithm': 'sha256'
},
}
在控制台输出中:
access denied: MisComputedContentHash: Our hash b'l0mKQ9ZG6Df44jdvH1FthWGvtKN93umZdmQCqd7YcgI=' (sha256) did not match theirs
【问题讨论】:
-
你使用的是什么版本的 Django?
-
@ReinstateMonica 最新的一个。 3.0.3
标签: django authentication django-rest-framework postman