File: mixcloud.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 (31 lines) | stat: -rw-r--r-- 1,036 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
Mixcloud OAuth2
===============

The `Mixcloud API`_ offers support for authorization. To this backend support:

- Register a new application at `Mixcloud Developers`_

- Add Mixcloud backend to ``AUTHENTICATION_BACKENDS`` in settings::

    SOCIAL_AUTH_AUTHENTICATION_BACKENDS = (
        ...
        'social.backends.mixcloud.MixcloudOAuth2',
    )

- Fill ``Client Id`` and ``Client Secret`` values in the settings::

    SOCIAL_AUTH_MIXCLOUD_KEY = ''
    SOCIAL_AUTH_MIXCLOUD_SECRET = ''

- Similar to the other OAuth backends you can define::

    SOCIAL_AUTH_MIXCLOUD_EXTRA_DATA = [('username', 'username'),
                                       ('name', 'name'),
                                       ('pictures', 'pictures'),
                                       ('url', 'url')]

  as a list of tuples ``(response name, alias)`` to store user profile data on
  the ``UserSocialAuth.extra_data``.

.. _Mixcloud API: http://www.mixcloud.com/developers/documentation
.. _Mixcloud Developers: http://www.mixcloud.com/developers