File: douban.rst

package info (click to toggle)
python-social-auth 0.2.1-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,828 kB
  • ctags: 3,245
  • sloc: python: 12,867; makefile: 119; sh: 3
file content (47 lines) | stat: -rw-r--r-- 1,450 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Douban
======

Douban supports OAuth 1 and 2.

Douban OAuth1
-------------

Douban OAuth 1 works similar to Twitter OAuth.

Douban offers per application keys named ``Consumer Key`` and ``Consumer
Secret``. To enable Douban OAuth these two keys are needed. Further
documentation at `Douban Services & API`_:

- Register a new application at `Douban API Key`_, make sure to mark the **web
  application** checkbox.

- Fill **Consumer Key** and **Consumer Secret** values in settings::

      SOCIAL_AUTH_DOUBAN_KEY = ''
      SOCIAL_AUTH_DOUBAN_SECRET = ''

- Add ``'social.backends.douban.DoubanOAuth'`` into your
  ``SOCIAL_AUTH_AUTHENTICATION_BACKENDS``.


Douban OAuth2
-------------

Recently Douban launched their OAuth2 support and the new developer site, you
can find documentation at `Douban Developers`_. To setup OAuth2 follow:

- Register a new application at `Create A Douban App`_, make sure to mark the
  **web application** checkbox.

- Fill **Consumer Key** and **Consumer Secret** values in settings::

      SOCIAL_AUTH_DOUBAN_OAUTH2_KEY = ''
      SOCIAL_AUTH_DOUBAN_OAUTH2_SECRET = ''

- Add ``'social.backends.douban.DoubanOAuth2'`` into your
  ``SOCIAL_AUTH_AUTHENTICATION_BACKENDS``.

.. _Douban Services & API: http://www.douban.com/service/
.. _Douban API Key: http://www.douban.com/service/apikey/apply
.. _Douban Developers: http://developers.douban.com/
.. _Create A Douban App : http://developers.douban.com/apikey/apply