http://www.django-rest-framework.org/api-guide/authentication/#tokenauthentication
这里是官方文档
Note that the default obtain_auth_token view explicitly uses JSON requests and responses, rather than using default renderer and parser classes in your settings. If you need a customized version of the obtain_auth_token view, you can do so by overriding the ObtainAuthToken view class, and using that in your url conf instead.
By default there are no permissions or throttling applied to the obtain_auth_token view. If you do wish to apply throttling you'll need to override the view class, and include them using the throttle_classes attribute.
这两段话不是很理解意思,我先说一下自己的理解,在问问大家是如何想的:
- 如果使用内置的 obtain_auth_token view 的和话,请求和相应都是通过 json 数据。 我现在使用 curl post 能够获得到账户的 token
- 如果要使用自己的认证方式,就是自己重写 ObtainAuthToken view 这个了类吗? 目前我的一点疑问是,自己定制的认证方式,是普通的表单传递认证还是啥? 如果实现自己的表单认证方式,我要如何去写,在这里好纠结,不知道如何表达
- 下面的那段话还不是很理解