auth.webservice.php 23.6 KB
Newer Older
1
2
3
4
<?php
/**
 *
 * @package    mahara
5
 * @subpackage core
6
 * @author     Catalyst IT Ltd
7
8
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL version 3 or later
 * @copyright  For copyright information on Mahara, please see the README file distributed with this software.
9
10
11
12
13
 *
 */

defined('INTERNAL') || die();

14
15
16
$string['webservice'] = 'Web services';
$string['title'] = 'Web services';
$string['description'] = 'Web services-only users authenticated against Mahara\'s database';
17
$string['webservicesconfig'] = 'Configuration';
18
$string['webservicesconfigdesc'] = 'Here you can set up the varying web services rules and enable or disable them.';
19
$string['webserviceconnectionsconfigdesc'] = 'Set up the connection objects that registered plugins can use for communication with external systems';
20
21
22
$string['completeregistration'] = 'Complete registration';
$string['emailalreadytaken'] = 'This email address has already registered here';
$string['iagreetothetermsandconditions'] = 'I agree to the Terms and Conditions.';
Gregor Anzelj's avatar
Gregor Anzelj committed
23
$string['passwordinvalidform1'] = 'Your password must be at least %s characters long. Passwords are case sensitive and must be different from your username. Your password must contain %s.';
24
$string['registeredemailsubject'] = 'You have registered at %s';
25
$string['registeredemailmessagetext'] = 'Hello %s,
26
27
28
29
30
31
32
33
34
35
36

Thank you for registering an account on %s. Please follow this link to
complete the signup process:

%sregister.php?key=%s

The link will expire in 24 hours.

--
Regards,
The %s Team';
37
$string['registeredemailmessagehtml'] = '<p>Hello %s,</p>
38
39
40
41
42
43
44
45
<p>Thank you for registering an account on %s. Please follow this link
to complete the signup process:</p>
<p><a href="%sregister.php?key=%s">%sregister.php?key=%s</a></p>
<p>The link will expire in 24 hours.</p>

<pre>--
Regards,
The %s Team</pre>';
46
$string['registeredok'] = '<p>You have successfully registered. Please check your email account for instructions on how to activate your account.</p>';
47
48
$string['registrationnosuchkey'] = 'Sorry, there does not seem to be a registration with this key. Perhaps you waited longer than 24 hours to complete your registration? Otherwise, it might be our fault.';
$string['registrationunsuccessful'] = 'Sorry, your registration attempt was unsuccessful. This is our fault, not yours. Please try again later.';
49
50
51
$string['usernameinvalidform'] = 'Usernames may contain letters, numbers and most common symbols, and must be from 3 to 30 characters in length. Spaces are not allowed.';
$string['usernameinvalidadminform'] = 'Usernames may contain letters, numbers and most common symbols, and must be from 3 to 236 characters in length. Spaces are not allowed.';
$string['youmaynotregisterwithouttandc'] = 'You may not register unless you agree to abide by the <a href="terms.php">Terms and Conditions</a>.';
52

53

Robert Lyon's avatar
Robert Lyon committed
54
$string['pluginconnections'] = 'Connection objects';
55
$string['nodefinedconnections'] = 'There are no webservice connections defined in any plugin. Please define a connection first.';
Robert Lyon's avatar
Robert Lyon committed
56
$string['instancelistempty'] = 'No connection objects for this institution.';
57

58
59
60
61
62
$string['addconnection'] = 'Add client connection';
$string['editconnection'] = 'Edit client connection';
$string['clientconnections'] = 'Client connection';
$string['plugin'] = 'Connection plugin';
$string['clienturl'] = 'Web service URL';
63
$string['password'] = 'Password';
64
65
$string['parameters'] = 'Fixed parameters to pass';
$string['certificate'] = 'XML-RPC partner certificate';
66
67
68
$string['enable'] = 'Connection enabled';
$string['json'] = 'JSON encoded';
$string['isfatal'] = 'Is fatal on error';
69
$string['type'] = 'Web service type';
70
71
$string['nameexists'] = "Name already in use";
$string['emptytoken'] = 'Token must be supplied';
72
73
$string['emptyuser'] = 'User must be supplied';
$string['emptyuserpass'] = 'Password must be supplied';
74
$string['emptycert'] = 'Certificate must be supplied';
75
76
$string['header'] = 'Header name';
$string['useheader'] = 'Put authentication in header';
77
78
$string['invalidauthtypecombination'] = 'Invalid authentication type selected for %s';
$string['emptycertextended'] = 'When using certificate based auth you must also enter a token or username/password';
79
80
81
$string['emptyoauthkey'] = 'Consumer key must be supplied for OAuth1.x';
$string['emptyoauthsecret'] = 'Secret must be supplied for OAuth1.x';
$string['consumer'] = 'Consumer key';
82
$string['secret'] = 'Secret';
83

84
// core webservices strings start here
85
$string['control_webservices'] = 'Switch web services on or off: ';
86
87
88
89
$string['webservice_requester_enabled_label'] = 'Web service requester master switch';
$string['webservice_requester_enabled_label2'] = 'Allow outgoing web service requests:';
$string['webservice_provider_enabled_label'] = 'Web service provider master switch';
$string['webservice_provider_enabled_label2'] = 'Accept incoming web service requests:';
90
$string['formatdate'] = '';
91
$string['webservice_master_switches'] = 'Enable web service functionality';
92
$string['connectionsswitch'] = 'Switch managed client connections on or off';
93
$string['manage_protocols1'] = 'Enable or disable protocols supported as a web services provider:';
94
$string['protocol'] = 'Protocol';
95
$string['oauth'] = 'OAuth';
96
97
98
$string['rest'] = 'REST';
$string['soap'] = 'SOAP';
$string['xmlrpc'] = 'XML-RPC';
99
100
$string['manage_certificates'] = 'These are the certificates generated as part of <a href="%s">Networking</a> services. These values are used by Mahara when web services security signatures and encryption are enabled for a particular web services token or service user (only XML-RPC and legacy MNet).';
$string['certificates'] = 'Networking certificates';
101

102
103
104
$string['servicefunctiongroups'] = 'Manage service groups';
$string['servicegroup'] = 'Service group: %s';
$string['sfgdescription'] = 'Build lists of functions into service groups that can be allocated to users authorised for execution.';
105
106
$string['name'] = 'Name';
$string['component'] = 'Component';
107
$string['customservicegroup'] = '(Custom)';
108
$string['functions'] = 'Functions';
109
$string['enableservice'] = 'Enable or disable the service';
110
111
$string['restricteduserswarning'] = 'Warning: There are existing token users for this service, who may be unable to access it if you enable "%s".';
$string['tokenuserswarning'] = 'Warning: There are existing token users for this service, who may be unable to access it if you disable "%s".';
112
113
$string['usersonly'] = 'Users only';
$string['tokensonly'] = 'Tokens only';
114
115
$string['switchtousers'] = 'Switch to users';
$string['switchtotokens'] = 'Switch to tokens';
116

117
118
$string['invalidservice'] = 'Invalid service selected ';
$string['invalidfunction'] = 'Invalid function selected ';
119
120
$string['tokengenerationfailed'] = 'Token generation failed';
$string['parametercannotbevalueoptional'] = 'Parameter cannot be value optional';
121
122
123
$string['invalidresponse'] = 'Invalid response';
$string['invalidstatedetected'] = 'Invalid state detected';
$string['codingerror'] = 'Coding error';
124
125
126
$string['accessextfunctionnotconf'] = 'Access to external function not configured';
$string['missingfuncname'] = 'Missing function name';
$string['invalidretdesc'] = 'Invalid return description';
127
$string['invalidparamdesc'] = 'Invalid parameter description';
128
$string['missingretvaldesc'] = 'Missing returned values description';
129
$string['missingparamdesc'] = 'Missing parameter description';
130
$string['missingimplofmeth'] = 'Missing implementation method of "%s"';
131
$string['cannotfindimplfile'] = 'Cannot find file with external function implementation';
132
133
$string['servicenamemustbeunique'] = 'That name is already in use by another service group.';
$string['serviceshortnamemustbeunique'] = 'That short name is already in use by another service group.';
134

135
$string['apptokens'] = 'Application connections';
136
$string['connections'] = 'Connection manager';
137
138
139
140
$string['servicetokens'] = 'Manage service access tokens';
$string['tokens'] = 'Service access tokens';
$string['users'] = 'Service users';
$string['stdescription'] = 'Generate access tokens and allocate users to service groups';
141
142
143
144
145
$string['username'] = 'User';
$string['owner'] = 'Owner';
$string['servicename'] = 'Service';
$string['generate'] = 'Generate token';
$string['invalidtoken'] = 'Invalid token selected';
146
$string['invalidtokennotsuppied'] = 'Invalid token selected or none supplied';
147
$string['token'] = 'Token';
148
$string['tokenid'] = 'Token "%s"';
149
150
151
$string['invaliduserselected'] = 'Invalid user selected';
$string['invaliduserselectedinstitution'] = 'Invalid user for token institution selected from user search';
$string['noservices'] = 'No services configured';
152
153
154
155
156
157
$string['wssigenc'] = 'Enable web services security (XML-RPC Only)';
$string['titlewssigenc'] = 'Web services security';
$string['last_access'] = 'Last access';
$string['verifier'] = 'Verifier token';
$string['oob'] = 'Out-of-band OAuth verification';
$string['oobinfo'] = 'The following is your verification code that will authorise your external application to have access to the approved data. Please copy and paste the code into the associated application prompt to continue.';
158
159
$string['instructions'] = 'Instructions';

160
$string['webservicelogs'] = 'Web services logs';
161
$string['webservicelogsnav'] = 'Logs';
162
163
164
$string['timetaken'] = 'Time taken';
$string['timelogged'] = 'When';
$string['info'] = 'Info';
165
$string['errors'] = 'Only errors';
166

167
168
$string['manageserviceusers'] = 'Manage service users';
$string['sudescription'] = 'Allocate users to service groups and institutions. User must only be configured once. All users must have the "webservice" authentication method. The instance of the "webservice" authentication method of the user must be from an institution that they are a member of.';
169
$string['serviceuser'] = 'Service owner';
170
$string['serviceusername'] = 'Service owner "%s"';
171
$string['invalidserviceuser'] = 'Invalid service user selected';
172
$string['nouser'] = 'Please select a user';
173
$string['duplicateuser'] = 'User account is already configured for web services.';
174
175

$string['servicefunctionlist'] = 'Functions allocated against the service';
176
$string['sfldescription'] = 'Build the list of functions that are available to this service.';
177
178
179
180
181
182
$string['functionname'] = 'Function name';
$string['classname'] = 'Class name';
$string['methodname'] = 'Method name';
$string['invalidinput'] = 'Invalid input';
$string['configsaved'] = 'Configuration saved';

183
$string['webservices_title'] = 'Web services configuration';
184

185
186
187
$string['headingusersearchtoken'] = 'Web services: Token user search';
$string['headingusersearchuser'] = 'Web services: Service user search';
$string['usersearchinstructions'] = 'Select a user to associate with a web service by clicking on its avatar. You can search for users by clicking on the initials of their first and last names or by entering a name in the search box. You can also enter an email address in the search box if you would like to search email addresses.';
188
189
190
$string['sha1fingerprint'] = 'SHA1 fingerprint: %s';
$string['md5fingerprint'] = 'MD5 fingerprint: %s';
$string['publickeyexpireson'] = 'Public key expires: %s';
191
192
193

// wsdoc
$string['function'] = 'Function';
194
$string['wsdocdescription'] = 'Description';
195
196
197
198
$string['component'] = 'Component';
$string['method'] = 'Method';
$string['class'] = 'Class';
$string['arguments'] = 'Arguments';
199
200
$string['invalidparameter'] = 'Invalid parameter value detected; execution cannot continue. ';
$string['wsdoc'] = 'Web services documentation';
201
202

// testclient
203
$string['testclient'] = 'Web services test client';
204
$string['testclientnav'] = 'Test client';
205
206
$string['tokenauth'] = 'Token';
$string['userauth'] = 'User';
207
208
209
$string['certauth'] = 'Certificate';
$string['wsseauth'] = 'WSSE';
$string['oauth1auth'] = 'OAuth1.x';
210
$string['authtype'] = 'Authentication type';
211
$string['sauthtype'] = 'AuthType';
212
213
$string['enterparameters'] = 'Enter function parameters';
$string['testclientinstructions'] = 'This is the interactive test client facility for web services. This enables you to select a function and then execute it live against the current system. Please be aware that ANY function you execute will run for real.';
214
$string['executed'] = 'Function call executed';
215
216
$string['invaliduserpass'] = 'Invalid web services username / web services password supplied for "%s"';
$string['invalidtoken'] = 'Invalid web services token supplied';
217
218
$string['iterationtitle'] = '%s iteration: %s';
$string['unabletoruntestclient'] = 'Web service test client needs to be run under https in production mode or have $cfg->productionmode = false in your config.php';
219
220
221
222

//oauth server registry
$string['accesstokens'] = 'OAuth access tokens';
$string['notokens'] = 'You have no application tokens';
223
$string['externalapps'] = 'External apps';
224
$string['oauth1'] = 'OAuth1.x';
225
226
$string['externalappsregister'] = 'Registration of external apps';
$string['userapplications1'] = 'Settings for external applications';
227
228
229
$string['accessto'] = 'Access to';
$string['application'] = 'Application';
$string['callback'] = 'Callback URI';
230
$string['consumer_key'] = 'Consumer key';
231
232
233
234
235
236
237
238
239
240
241
$string['consumer_secret'] = 'Consumer secret';
$string['add'] = 'Add';
$string['application'] = 'Application';
$string['oauthserverdeleted'] = 'Server deleted';
$string['oauthtokendeleted'] = 'Application token deleted';
$string['errorregister'] = 'Server registry failed';
$string['application_uri'] = 'Application URI';
$string['application_title'] = 'Application title';
$string['errorupdate'] = 'Update failed';
$string['erroruser'] = 'Invalid user specified';
$string['authorise'] = 'Authorise application access';
242
243
$string['oauth_access'] = 'This application will have access to your users\' details and resources';
$string['oauth_instructions'] = 'If you wish to grant access to this application, then click "Authorise application access". If you do not want to grant access, press "Cancel".';
244
$string['setauthinstancefailed'] = 'Setting the "Web services" authentication for institution "%s" failed. Please try adding it via Administration -> Institutions -> Settings page.';
245
246

// running webservices messages
247
$string['accesstofunctionnotallowed'] = 'Access to the function %s() is not allowed. Please check if a service containing the function is enabled. In the service settings: If the service is restricted, check that the user is listed. Still in the service settings check for IP restriction or if the service requires a capability.';
248
249
250
251
252
253
254
255
256
257
258
259
$string['accessexception'] = 'Access control exception';
$string['accessnotallowed'] = 'Access to web service not allowed';
$string['addfunction'] = 'Add function';
$string['addfunctions'] = 'Add functions';
$string['addservice'] = 'Add a new service: {$a->name} (id: {$a->id})';
$string['apiexplorer'] = 'API explorer';
$string['arguments'] = 'Arguments';
$string['authmethod'] = 'Authentication method';
$string['context'] = 'Context';
$string['createtoken'] = 'Create token';
$string['createtokenforuser'] = 'Create a token for a user';
$string['createuser'] = 'Create a specific user';
260
$string['default'] = 'Default %s';
261
262
$string['deleteservice'] = 'Delete the service: {$a->name} (id: {$a->id})';
$string['doc'] = 'Documentation';
263
$string['documentation'] = 'web services documentation';
264
265
266
267
268
269
270
$string['enabledocumentation'] = 'Enable developer documentation';
$string['enableprotocols'] = 'Enable protocols';
$string['enablews'] = 'Enable web services';
$string['error'] = 'Error: %s';
$string['errorcodes'] = 'Error message';
$string['errorinvalidparam'] = 'The param "%s" is invalid.';
$string['errorinvalidparamsapi'] = 'Invalid external api parameter';
271
272
273
$string['errorinvalidparamsdesc'] = 'Invalid external API description';
$string['errorinvalidresponseapi'] = 'Invalid external API response';
$string['errorinvalidresponsedesc'] = 'Invalid external API response description';
274
$string['errormissingkey'] = 'Missing required key in single structure: %s';
275
$string['errornotemptydefaultparamarray'] = 'The web service description parameter named \'%s\' is a single or multiple structure. The default can only be an empty array. Check web service description.';
276
$string['erroronlyarray'] = 'Only arrays accepted.';
277
278
$string['erroroptionalparamarray'] = 'The web service description parameter named \'%s\' is a single or multiple structure. It cannot be set as VALUE_OPTIONAL. Check web service description.';
$string['errorresponsemissingkey'] = 'Error in response: Missing following required key in a single structure: %s';
279
280
$string['errorscalartype'] = 'Scalar type expected, array or object received.';
$string['errorunexpectedkey'] = 'Unexpected keys (%s) detected in parameter array.';
281
$string['errorunexpectedcustomkey'] = 'Unexpected custom keys (%s) detected in parameter array. They are being ignored by Mahara. This message is informational only so you can review the parameters and are aware that they are being ignored.';
282
283
284
285
286
287
$string['execute'] = 'Execute';
$string['expires'] = 'Expires';
$string['externalservice'] = 'External service';
$string['function'] = 'Function';
$string['generalstructure'] = 'General structure';
$string['information'] = 'Information';
288
$string['invalidlogin'] = 'Failed to log you in. Please check your username and password.';
289
290
291
292
293
294
295
$string['invalidaccount'] = 'Invalid web services account: Check service user configuration';
$string['invalidextparam'] = 'Invalid external API parameter: %s';
$string['invalidextresponse'] = 'Invalid external API response: %s';
$string['invalidiptoken'] = 'Invalid token: Your IP is not supported';
$string['invalidtimedtoken'] = 'Invalid token: Token expired';
$string['invalidtoken'] = 'Invalid token: Token not found';
$string['invalidtokensession'] = 'Invalid session based token: Session not found or expired';
296
$string['iprestriction'] = 'IP restriction';
297
$string['list'] = 'list of';
298
299
300
301
$string['key'] = 'Key';
$string['missingpassword'] = 'Missing password';
$string['missingusername'] = 'Missing username';
$string['notoken'] = 'The token list is empty.';
302
$string['nowsprotocolsenabled'] = 'No web service protocols are enabled. You need at least one <a href="%s">protocol</a> enabled.';
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
$string['onesystemcontrolling'] = 'One system controlling Mahara with a token';
$string['operation'] = 'Operation';
$string['optional'] = 'Optional';
$string['phpparam'] = 'XML-RPC (PHP structure)';
$string['potusers'] = 'Not authorised users';
$string['print'] = 'Print all';
$string['protocol'] = 'Protocol';
$string['removefunction'] = 'Remove';
$string['required'] = 'Required';
$string['resettokenconfirm'] = 'Do you really want to reset this web service key for <strong>{%s}</strong> on the service <strong>{%s}</strong>?';
$string['response'] = 'Response';
$string['restcode'] = 'REST';
$string['restexception'] = 'REST';
$string['restparam'] = 'REST (POST parameters)';
$string['restrictedusers'] = 'Authorised users only';
318
$string['fortokenusers'] = 'User token access';
319
$string['usertokens'] = 'Personal user tokens';
320
$string['serviceaccess'] = 'Service access';
321
322
323
$string['tokenclient'] = 'Client app';
$string['tokenclientunknown'] = '(Not specified)';
$string['tokenmanuallycreated'] = 'Manually created';
324
325
326
327
328
329
330
331
$string['gen'] = 'Generate';
$string['no_token'] = 'Token not generated';
$string['token_generated'] = 'Token generated';
$string['securitykey'] = 'Security key (token)';
$string['selectedcapability'] = 'Selected';
$string['selectspecificuser'] = 'Select a specific user';
$string['service'] = 'Service';
$string['serviceusers'] = 'Authorised users';
332
333
334
$string['servicenamelabel'] = 'Name';
$string['servicenamedesc'] = 'A human-readable name for this service group.';
$string['serviceshortnamelabel'] = 'Short name';
335
$string['serviceshortnamedesc'] = 'A machine-readable name for this service group. This is the name that will be used if an external service needs to refer to this service group.';
336
$string['servicecomponentnote'] = 'This service provides functionality for the component "%s"';
337
338
339
$string['simpleauthlog'] = 'Simple authentication login';
$string['step'] = 'Step';
$string['testclient'] = 'Web service test client';
340
$string['testclientdescription'] = '* The web service test client <strong>executes</strong> the functions for <strong>REAL</strong>. Do not test functions that you don\'t know. <br/>* All existing web service functions are not yet implemented into the test client. <br/>* In order to check that a user cannot access some functions, you can test some functions that you didn\'t allow.<br/>* To see clearer error messages, set the debugging to <strong>{$a->mode}</strong> into {$a->atag}<br/>* Access the {$a->amfatag}.';
341
342
343
344
345
346
347
348
349
350
$string['testwithtestclient'] = 'Test the service';
$string['tokenauthlog'] = 'Token authentication';
$string['userasclients'] = 'Users as clients with token';
$string['validuntil'] = 'Valid until';
$string['wrongusernamepassword'] = 'Wrong username or password';
$string['institutiondenied'] = 'Access to institution denied';
$string['wsauthnotenabled'] = 'The web service authentication plugin is disabled.';
$string['wsdocumentation'] = 'Web service documentation';
$string['wspassword'] = 'Web service password';
$string['wsusername'] = 'Web service username';
351
$string['webservicesenabled'] = 'Web services enabled';
352
$string['webservicesnotenabled'] = 'You need to enable at least one protocol';
353
354
355
356

// Web Service functions errors
$string['nooauth'] = 'Not enabled for OAuth';
$string['accessdenied'] = 'access denied';
357
358
359
$string['accessdeniedforinst'] = ' access denied for institution "%s"';
$string['accessdeniedforinstuser'] = ' access denied for institution "%s" with user "%s"';
$string['accessdeniedforinstgroup'] = ' access denied for institution "%s" on group "%s"';
360
$string['usernameexists2'] = 'Username "%s" is not valid.';
361
362
$string['invalidauthtype'] = 'Invalid authentication type "%s"';
$string['invalidauthtypeuser'] = 'Invalid authentication type "%s" with user "%s"';
363
$string['invalidsocialprofile'] = 'Invalid social profile "%s"';
364
$string['instexceedmax'] = 'Institution exceeded maximum allowed "%s"';
365
$string['cannotdeleteaccount'] = 'cannot delete account that has been used and is not suspended. User id "%s"';
366
$string['nousernameorid'] = 'no username or id ';
367
368
369
370
371
372
373
$string['nousernameoridgroup'] = 'no username or id for group "%s"';
$string['invaliduser'] = 'invalid user "%s"';
$string['invaliduserid'] = 'invalid user id "%s"';
$string['invalidusergroup'] = 'invalid user "%s" for group "%s"';
$string['mustsetauth'] = 'must set auth and institution to update auth on user "%s"';
$string['invalidusername'] = 'Invalid username "%s"';
$string['invalidremoteusername'] = 'Invalid remote username "%s"';
374
$string['musthaveid'] = 'Must have id, userid or username';
375
376
377
378
379
$string['notauthforuseridinstitution'] = 'Not authorised for access to user id "%s" for institution "%s"';
$string['notauthforuseridinstitutiongroup'] = 'Not authorised for access to user id "%s" for institution "%s" to group "%s"';
$string['invalidfavourite'] = 'Invalid favourite "%s"';
$string['groupexists'] = 'Group already exists "%s"';
$string['instmustbeongroup'] = 'institution must be set on group "%s"';
380
$string['noname'] = 'no name or shortname specified';
381
382
$string['catinvalid'] = 'category "%s" invalid';
$string['invalidjointype'] = 'invalid join type combination "%s"';
383
$string['correctjointype'] = 'must select correct join type open, request, and/or controlled';
384
385
386
387
$string['groupeditroles'] = 'group edit roles specified "%s" must be one of: %s';
$string['invalidmemroles'] = 'Invalid group membership role "%s" for user "%s"';
$string['groupnotexist'] = 'Group "%s" does not exist';
$string['instmustset'] = 'institution must be set for "%s"';
388
$string['nogroup'] = 'no group specified';
389
$string['membersinvalidaction'] = 'invalid action "%s" for user "%s" on group "%s"';
390
391
$string['passwordmustbechangedviawebsite'] = 'You need to change your password. Please log in via a web browser in order to update your password.';
$string['featuredisabled'] = 'This web services feature is not enabled. Please contact your site administrator for more information.';
392
$string['institutionunknown'] = '- unknown -';
393
$string['unabletodeleteadmin'] = 'Unable to delete user with ID: "%s" as they are an admin';
394
$string['notuserblog'] = 'The journal is not owned by "%s"';