Debian Codegraph @

docs/socialaccount/providers/mediawiki.rst

raw
1 MediaWiki
2 ---------
3
4 MediaWiki OAuth2 documentation:
5 https://www.mediawiki.org/wiki/OAuth/For_Developers
6
7 The following MediaWiki settings are available:
8
9 .. code-block:: python
10
11 SOCIALACCOUNT_PROVIDERS = {
12 'mediawiki': {
13 'REST_API': 'https://meta.wikimedia.org/w/rest.php',
14 'USERPAGE_TEMPLATE': 'https://meta.wikimedia.org/wiki/{username}',
15 # Identify your application with a descriptive user agent.
16 # Format (generic template):
17 # <client>/<version> (<contact info>) [<extra lib>/<version> ...]
18 # Contact info can be a user page URL, project URL, or email.
19 # Example (bot):
20 'USER_AGENT': 'CoolBot/1.2 (+https://example.org/coolbot/; [email protected]) django-allauth',
21 }
22 }
23
24 REST_API:
25 Base URL of the MediaWiki site's REST API.
26 USERPAGE_TEMPLATE:
27 Link template for linking to users. Must have a ``{username}`` format field.
28 USER_AGENT:
29 Custom User-Agent header sent with API requests. Wikimedia requires that
30 automated clients send a descriptive User-Agent string with contact
31 information. Generic defaults (e.g. ``python-requests/x``) or absent
32 headers may be blocked or heavily rate limited. The recommended pattern is::
33
34 <client>/<version> (<contact>) [<library>/<version> ...]
35
36 where ``<contact>`` lets site operators reach you (URL or email). If you
37 run a bot, consider including the word ``bot`` (any case) so traffic can be
38 classified correctly. Do not spoof browser user agents.
39
40 If not set, a generic ``django-allauth`` value is used; you should override
41 this for production.
42
43 With the default settings, Wikimedia user identities (meta.wikimedia.org) will be used.
44
45 App registration for Wikimedia wikis:
46 https://meta.wikimedia.org/wiki/Special:OAuthConsumerRegistration/propose