This repository has been archived by the owner on Aug 15, 2023. It is now read-only.
forked from wikimedia/mediawiki-extensions-OAuth
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
extension.json
253 lines (253 loc) · 9.55 KB
/
extension.json
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
{
"name": "OAuth",
"version": "1.1.0",
"author": [
"Aaron Schulz",
"Chris Steipp",
"Brad Jorsch",
"Robert Vogel",
"Dejan Savuljesku"
],
"url": "https://www.mediawiki.org/wiki/Extension:OAuth",
"descriptionmsg": "mwoauth-desc",
"license-name": "GPL-2.0-or-later",
"type": "other",
"requires": {
"MediaWiki": ">= 1.38.0"
},
"ExtensionFunctions": [
"MediaWiki\\Extension\\OAuth\\Backend\\Hooks::onExtensionFunctions"
],
"DefaultUserOptions": {
"echo-subscriptions-web-oauth-owner": true,
"echo-subscriptions-email-oauth-owner": true,
"echo-subscriptions-web-oauth-admin": true,
"echo-subscriptions-email-oauth-admin": true
},
"GroupPermissions": {
"user": {
"mwoauthmanagemygrants": true
}
},
"AvailableRights": [
"mwoauthproposeconsumer",
"mwoauthupdateownconsumer",
"mwoauthmanageconsumer",
"mwoauthsuppress",
"mwoauthviewsuppressed",
"mwoauthviewprivate",
"mwoauthmanagemygrants"
],
"SessionProviders": {
"MediaWiki\\Extension\\OAuth\\SessionProvider": {
"class": "MediaWiki\\Extension\\OAuth\\SessionProvider",
"args": []
}
},
"SpecialPages": {
"OAuth": {
"class": "MediaWiki\\Extension\\OAuth\\Frontend\\SpecialPages\\SpecialMWOAuth",
"services": [
"GrantsLocalization"
]
},
"OAuthManageMyGrants": {
"class": "MediaWiki\\Extension\\OAuth\\Frontend\\SpecialPages\\SpecialMWOAuthManageMyGrants",
"services": [
"GrantsInfo",
"GrantsLocalization"
]
},
"OAuthListConsumers": {
"class": "MediaWiki\\Extension\\OAuth\\Frontend\\SpecialPages\\SpecialMWOAuthListConsumers",
"services": [
"GrantsLocalization"
]
}
},
"MessagesDirs": {
"MWOAuth": [
"i18n"
]
},
"ExtensionMessagesFiles": {
"MWOAuthAliases": "MWOAuth.alias.php"
},
"AutoloadNamespaces": {
"MediaWiki\\Extension\\OAuth\\": "src/"
},
"TestAutoloadNamespaces": {
"MediaWiki\\Extension\\OAuth\\Tests\\": "tests/phpunit/"
},
"TestAutoloadClasses": {
"MediaWiki\\Extension\\OAuth\\Tests\\TestHandlerFactory": "tests/TestHandlerFactory.php"
},
"ResourceModules": {
"ext.MWOAuth.styles": {
"styles": [
"ext.MWOAuth.BasicStyles.css",
"ext.MWOAuth.AuthorizeForm.css"
]
},
"ext.MWOAuth.AuthorizeDialog": {
"scripts": [
"ext.MWOAuth.AuthorizeDialog.js"
],
"dependencies": [
"jquery.ui"
],
"messages": [
"mwoauth-desc"
]
}
},
"ResourceFileModulePaths": {
"localBasePath": "resources/modules",
"remoteExtPath": "OAuth/resources/modules"
},
"callback": "MediaWiki\\Extension\\OAuth\\Backend\\Hooks::onRegistration",
"HookHandlers": {
"abusefilter": {
"class": "MediaWiki\\Extension\\OAuth\\Backend\\AbuseFilterHookHandler"
}
},
"Hooks": {
"AbuseFilter-builder": "abusefilter",
"AbuseFilter-computeVariable": "abusefilter",
"AbuseFilter-generateUserVars": "abusefilter",
"ChangeTagCanCreate": "MediaWiki\\Extension\\OAuth\\Backend\\Hooks::onChangeTagCanCreate",
"MergeAccountFromTo": "MediaWiki\\Extension\\OAuth\\Backend\\Hooks::onMergeAccountFromTo",
"CentralAuthGlobalUserMerged": "MediaWiki\\Extension\\OAuth\\Backend\\Hooks::onCentralAuthGlobalUserMerged",
"LoadExtensionSchemaUpdates": "MediaWiki\\Extension\\OAuth\\Backend\\UpdaterHooks::addSchemaUpdates",
"GetPreferences": "MediaWiki\\Extension\\OAuth\\Frontend\\UIHooks::onGetPreferences",
"MessagesPreLoad": "MediaWiki\\Extension\\OAuth\\Frontend\\UIHooks::onMessagesPreLoad",
"SpecialPageAfterExecute": "MediaWiki\\Extension\\OAuth\\Frontend\\UIHooks::onSpecialPageAfterExecute",
"SpecialPageBeforeFormDisplay": "MediaWiki\\Extension\\OAuth\\Frontend\\UIHooks::onSpecialPageBeforeFormDisplay",
"BeforeCreateEchoEvent": "MediaWiki\\Extension\\OAuth\\Frontend\\UIHooks::onBeforeCreateEchoEvent",
"CentralAuthAbortCentralAuthToken": "MediaWiki\\Extension\\OAuth\\Setup::onCentralAuthAbortCentralAuthToken",
"TestCanonicalRedirect": "MediaWiki\\Extension\\OAuth\\Setup::onTestCanonicalRedirect",
"SetupAfterCache": "MediaWiki\\Extension\\OAuth\\Backend\\Hooks::onSetupAfterCache",
"ApiRsdServiceApis": "MediaWiki\\Extension\\OAuth\\Backend\\Hooks::onApiRsdServiceApis",
"SpecialPage_initList": "MediaWiki\\Extension\\OAuth\\Frontend\\UIHooks::onSpecialPage_initList",
"ListDefinedTags": "MediaWiki\\Extension\\OAuth\\Backend\\Hooks::onListDefinedTags",
"ChangeTagsListActive": "MediaWiki\\Extension\\OAuth\\Backend\\Hooks::onChangeTagsListActive",
"LoginFormValidErrorMessages": "MediaWiki\\Extension\\OAuth\\Frontend\\UIHooks::onLoginFormValidErrorMessages"
},
"ConfigRegistry": {
"mwoauth": "GlobalVarConfig::newInstance"
},
"config": {
"MWOAuthCentralWiki": {
"value": false,
"description": "Wiki ID of OAuth management wiki. On wiki farms, it makes sense to set this to a wiki that acts as a portal site, is decidated to management, or just handles login/authentication. It can, however, be set to any wiki if the farm. For single-wiki sites or farms where each wiki manages consumers separately, it should be left as false."
},
"MWOAuthSharedUserIDs": {
"value": false,
"description": "Whether shared global user IDs are stored in the oauth tables. On wiki farms with a central authentication system (with integer user IDs) that share a single OAuth management wiki, this must be set to true. If wikis have a central authentication system but have their own OAuth management, then this can be either true or false. Otherwise it should always be set to false Setting this to true requires CentralIdLookup or an MWOAuth aware authentication extension. This value should not be changed after the fact to avoid ambigious IDs. Proper user ID migration should be done before any such changes."
},
"MWOAuthSharedUserSource": {
"value": null,
"description": "Source of shared user IDs, if enabled. If CentralIdLookup is available, this is the $providerId for CentralIdLookupFactory::getLookup(). Generally null would be what you want, to use the default provider. If that class is not available or the named provider is not found, this is\n * passed to the 'OAuthGetUserNamesFromCentralIds', 'OAuthGetLocalUserFromCentralId', 'OAuthGetCentralIdFromLocalUser', and 'OAuthGetCentralIdFromUserName' hooks. This has no effect if $wgMWOAuthSharedUserIDs is set to false."
},
"MWOAuthRequestExpirationAge": {
"value": 2592000,
"description": "Seconds after which an idle consumer request is marked as \"expired\""
},
"MWOAuthSecureTokenTransfer": {
"value": true,
"description": "Require HTTPs for user transactions that might send out secret tokens"
},
"MWOauthDisabledApiModules": {
"value": [],
"description": "List of API module classes to disable when OAuth is used for the request"
},
"MWOAuthReadOnly": {
"value": false,
"description": "Prevent write activity to the database. When this is set, consumers cannot be added or updated, and new authorizations are prohibited. Authorization headers for existing authorizations will continue to work. Useful for migrating database tables"
},
"OAuthGroupsToNotify": {
"value": [],
"description": "User groups to notify about new consumers that need to be reviewed"
},
"MWOAuthSessionCacheType": {
"value": null
},
"OAuthSecretKey": {
"value": null,
"description": "Random 32-bit string used to encrypt OAuth requests. Generate using \"base64_encode(random_bytes(32))\""
},
"OAuth2EnabledGrantTypes": {
"value": [
"authorization_code",
"refresh_token",
"client_credentials"
],
"description": "List of OAuth2 grants that client applications can use"
},
"OAuth2PrivateKey": {
"value": "",
"description": "Private key or a path to the private key used to sign OAuth2 JWT being transmitted"
},
"OAuth2PublicKey": {
"value": "",
"description": "Public key or a path to the public key used to verify OAuth2 resource requests"
},
"OAuth2RequireCodeChallengeForPublicClients": {
"value": true,
"description": "Controls whether clients are required to send code challenges with OAuth2 requests. This only applies to non-confidential clients"
},
"OAuth2GrantExpirationInterval": {
"description": "Controls validity period for access tokens. Does not apply to owner-only clients, whose access tokens are always non-expiring. Accepts ISO 8601 durations or can be set to \"infinity\" or false for non-expiring tokens",
"value": "PT1H"
},
"OAuth2RefreshTokenTTL": {
"description": "Controls validity period for refresh tokens. Accepts ISO 8601 durations or can be set to \"infinity\" or false for non-expiring tokens",
"value": "PT1M"
}
},
"GrantPermissions": {
"oauthmanageownclient": {
"mwoauthproposeconsumer": true,
"mwoauthupdateownconsumer": true,
"mwoauthmanagemygrants": true
}
},
"GrantPermissionGroups": {
"oauthmanageownclient": "administration"
},
"RestRoutes": [
{
"path": "/oauth2/authorize",
"factory": "MediaWiki\\Extension\\OAuth\\Rest\\Handler\\Authorize::factory"
},
{
"path": "/oauth2/access_token",
"factory": "MediaWiki\\Extension\\OAuth\\Rest\\Handler\\AccessToken::factory",
"method": "POST"
},
{
"path": "/oauth2/resource/{type}",
"factory": "MediaWiki\\Extension\\OAuth\\Rest\\Handler\\Resource::factory"
},
{
"path": "/oauth2/client",
"class": "MediaWiki\\Extension\\OAuth\\Rest\\Handler\\RequestClient",
"method": "POST"
},
{
"path": "/oauth2/client/{client_key}/reset_secret",
"class": "MediaWiki\\Extension\\OAuth\\Rest\\Handler\\ResetClientSecret",
"method": "POST"
},
{
"path": "/oauth2/client",
"class": "MediaWiki\\Extension\\OAuth\\Rest\\Handler\\ListClients",
"services": [
"DBLoadBalancer"
],
"method": "GET"
}
],
"load_composer_autoloader": true,
"manifest_version": 2
}