【发布时间】:2018-01-27 07:40:32
【问题描述】:
我已经尝试了两种记录在案的身份验证方法,但都产生 403 Forbidden,详细信息:“未提供身份验证凭据。”
auth = coreapi.auth.TokenAuthentication(
scheme='Token', token='token')
和
auth = coreapi.auth.BasicAuthentication(
username='user',
password='password')
url = 'http://127.0.0.1:8000/schema/'
client = coreapi.Client(auth=auth)
schema = client.get(url)
【问题讨论】: