-
Notifications
You must be signed in to change notification settings - Fork 12
/
extension.json
289 lines (289 loc) · 10.3 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
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
{
"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.43"
},
"ExtensionFunctions": [
"MediaWiki\\Extension\\OAuth\\Backend\\Hooks::onExtensionFunctions"
],
"ServiceWiringFiles": [
"src/ServiceWiring.php"
],
"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",
"SkinFactory",
"UrlUtils"
]
},
"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\\Entity\\MockClientEntity": "tests/phpunit/Entity/MockClientEntity.php",
"MediaWiki\\Extension\\OAuth\\Tests\\Entity\\Mock_ClientEntity": "tests/phpunit/Entity/MockClientEntity.php"
},
"ResourceModules": {
"ext.MWOAuth.styles": {
"styles": [
"ext.MWOAuth.BasicStyles.less",
"ext.MWOAuth.AuthorizeForm.less"
]
},
"ext.MWOAuth.AuthorizeDialog": {
"scripts": [
"ext.MWOAuth.AuthorizeDialog.js"
],
"dependencies": [
"oojs-ui-core",
"oojs-ui-windows"
],
"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"
},
"backend": {
"class": "MediaWiki\\Extension\\OAuth\\Backend\\Hooks",
"services": [
"ChangeTagDefStore",
"ConnectionProvider"
]
},
"frontend": {
"class": "MediaWiki\\Extension\\OAuth\\Frontend\\UIHooks",
"services": [
"PermissionManager"
]
},
"setup": {
"class": "MediaWiki\\Extension\\OAuth\\Setup"
},
"schema": {
"class": "MediaWiki\\Extension\\OAuth\\Backend\\UpdaterHooks"
}
},
"Hooks": {
"AbuseFilter-builder": "abusefilter",
"AbuseFilter-computeVariable": "abusefilter",
"AbuseFilter-generateUserVars": "abusefilter",
"ChangeTagCanCreate": "backend",
"MergeAccountFromTo": "MediaWiki\\Extension\\OAuth\\Backend\\Hooks::onMergeAccountFromTo",
"LoadExtensionSchemaUpdates": "schema",
"GetPreferences": "frontend",
"MessagesPreLoad": "frontend",
"SpecialPageAfterExecute": "frontend",
"SpecialPageBeforeFormDisplay": "frontend",
"BeforeCreateEchoEvent": "MediaWiki\\Extension\\OAuth\\Frontend\\UIHooks::onBeforeCreateEchoEvent",
"TestCanonicalRedirect": "setup",
"SetupAfterCache": "backend",
"ApiRsdServiceApis": "backend",
"SpecialPage_initList": "frontend",
"ListDefinedTags": "backend",
"ChangeTagsListActive": "backend",
"LoginFormValidErrorMessages": "frontend"
},
"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 true, 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"
},
"OAuthAutoApprove": {
"value": [],
"description": "Rules for automatically approving new consumers (instead of requiring manual review by an OAuth admin before they are usable). Takes a list of conditions; meeting any one of the conditions results in auto-approval. Conditions are an associative array of <rule name> => <rule value>; the condition is met if every one of its rules is satisfied. Current the only supported rule is 'grants', which takes a list of grant names, and is satisfied when all the grants requested for the consumer are within that list."
},
"OAuthGroupsToNotify": {
"value": [],
"description": "User groups to notify about new consumers that need to be reviewed"
},
"MWOAuthSessionCacheType": {
"value": null,
"description": "The cache type used for most temporary data storage. An index into $wgObjectCaches. The default is $wgSessionCacheType."
},
"MWOAuthNonceCacheType": {
"value": null,
"description": "The cache type used for OAuth 1.0 nonces. An index into $wgObjectCaches. The default is $wgMWOAuthSessionCacheType."
},
"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 (stored in the cache configured in MWOAuthSessionCacheType). 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. Defaults to one hour.",
"value": "PT1H"
},
"OAuth2RefreshTokenTTL": {
"description": "Controls validity period for refresh tokens (stored in the cache configured in MWOAuthSessionCacheType). Accepts ISO 8601 durations or can be set to \"infinity\" or false for non-expiring tokens. Defaults to one month.",
"value": "P1M"
}
},
"GrantPermissions": {
"oauthmanageownclient": {
"mwoauthproposeconsumer": true,
"mwoauthupdateownconsumer": true,
"mwoauthmanagemygrants": true
}
},
"GrantPermissionGroups": {
"oauthmanageownclient": "administration"
},
"GrantRiskGroups": {
"oauthmanageownclient": "internal"
},
"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
}