相关疑难解决方法(0)

Django Tastypie:如何使用API​​密钥进行身份验证

我正在使用TastyPie制作内部API.我有

from tastypie.authentication import ApiKeyAuthentication
class MyResource(ModelResource):
  Meta:
    authentication = ApiKeyAuthentication()
Run Code Online (Sandbox Code Playgroud)

禁用Auth规则后,我的API运行良好.有了它,无论我尝试什么,我都会收到401(未经授权)的回复.

我确信这是一旦你看到它在行动中非常明显的事情之一,但在此期间,请告知如何提出请求(GET).

python django tastypie

14
推荐指数
1
解决办法
1万
查看次数

标签 统计

django ×1

python ×1

tastypie ×1