auth.webservice.php 22.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
23
24
$string['completeregistration'] = 'Complete registration';
$string['emailalreadytaken'] = 'This email address has already registered here';
$string['iagreetothetermsandconditions'] = 'I agree to the Terms and Conditions.';
$string['passwordformdescription'] = 'Your password must be at least six characters long and contain at least one digit and two letters.';
$string['passwordinvalidform'] = 'Your password must be at least six characters long and contain at least one digit and two letters.';
25
$string['registeredemailsubject'] = 'You have registered at %s';
26
$string['registeredemailmessagetext'] = 'Hello %s,
27
28
29
30
31
32
33
34
35
36
37

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';
38
$string['registeredemailmessagehtml'] = '<p>Hello %s,</p>
39
40
41
42
43
44
45
46
<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>';
47
$string['registeredok'] = '<p>You have successfully registered. Please check your email account for instructions on how to activate your account.</p>';
48
49
$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.';
50
51
52
53
$string['usernamealreadytaken'] = 'Sorry, this username is already taken.';
$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>.';
54

55

Robert Lyon's avatar
Robert Lyon committed
56
57
58
$string['pluginconnections'] = 'Connection objects';
$string['pcdescription'] = 'Select a connection';
$string['instancelistempty'] = 'No connection objects for this institution.';
59

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

86
// core webservices strings start here
87
$string['control_webservices'] = 'Switch web services on or off: ';
88
89
90
91
$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:';
92
$string['formatdate'] = '';
93
$string['webservice_master_switches'] = 'Enable web service functionality';
94
$string['connectionsswitch'] = 'Switch managed client connections on or off';
95
$string['manage_protocols1'] = 'Enable or disable protocols supported as a web services provider:';
96
97
98
99
$string['protocol'] = 'Protocol';
$string['rest'] = 'REST';
$string['soap'] = 'SOAP';
$string['xmlrpc'] = 'XML-RPC';
100
101
$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';
102

103
104
105
$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.';
106
107
$string['name'] = 'Name';
$string['component'] = 'Component';
108
$string['customservicegroup'] = '(Custom)';
109
$string['functions'] = 'Functions';
110
$string['enableservice'] = 'Enable or disable the service';
111
112
$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".';
113
114
$string['usersonly'] = 'Users only';
$string['tokensonly'] = 'Tokens only';
115
116
$string['switchtousers'] = 'Switch to users';
$string['switchtotokens'] = 'Switch to tokens';
117

118
119
$string['invalidservice'] = 'Invalid service selected ';
$string['invalidfunction'] = 'Invalid function selected ';
120
121
$string['tokengenerationfailed'] = 'Token generation failed';
$string['parametercannotbevalueoptional'] = 'Parameter cannot be value optional';
122
123
124
$string['invalidresponse'] = 'Invalid response';
$string['invalidstatedetected'] = 'Invalid state detected';
$string['codingerror'] = 'Coding error';
125
126
127
$string['accessextfunctionnotconf'] = 'Access to external function not configured';
$string['missingfuncname'] = 'Missing function name';
$string['invalidretdesc'] = 'Invalid return description';
128
$string['invalidparamdesc'] = 'Invalid parameter description';
129
$string['missingretvaldesc'] = 'Missing returned values description';
130
$string['missingparamdesc'] = 'Missing parameter description';
131
$string['missingimplofmeth'] = 'Missing implementation method of "%s"';
132
$string['cannotfindimplfile'] = 'Cannot find file with external function implementation';
133
134
$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.';
135

136
$string['apptokens'] = 'Application connections';
137
$string['connections'] = 'Connection manager';
138
139
140
141
$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';
142
143
144
145
146
147
$string['username'] = 'User';
$string['owner'] = 'Owner';
$string['servicename'] = 'Service';
$string['generate'] = 'Generate token';
$string['invalidtoken'] = 'Invalid token selected';
$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
223

//oauth server registry
$string['accesstokens'] = 'OAuth access tokens';
$string['notokens'] = 'You have no application tokens';
$string['oauth'] = 'OAuth';
224
$string['oauth1'] = 'OAuth1.x';
225
$string['oauthv1sregister'] = 'OAuth service registration';
226
227
228
229
$string['userapplications'] = 'OAuth consumer keys';
$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
245

// running webservices messages
246
$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.';
247
248
249
250
251
252
253
254
255
256
257
258
$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';
259
$string['default'] = 'Default %s';
260
261
$string['deleteservice'] = 'Delete the service: {$a->name} (id: {$a->id})';
$string['doc'] = 'Documentation';
262
$string['documentation'] = 'web services documentation';
263
264
265
266
267
268
269
$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';
270
271
272
$string['errorinvalidparamsdesc'] = 'Invalid external API description';
$string['errorinvalidresponseapi'] = 'Invalid external API response';
$string['errorinvalidresponsedesc'] = 'Invalid external API response description';
273
$string['errormissingkey'] = 'Missing required key in single structure: %s';
274
$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.';
275
$string['erroronlyarray'] = 'Only arrays accepted.';
276
277
$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';
278
279
280
281
282
283
284
285
286
$string['errorscalartype'] = 'Scalar type expected, array or object received.';
$string['errorunexpectedkey'] = 'Unexpected keys (%s) detected in parameter array.';
$string['execute'] = 'Execute';
$string['expires'] = 'Expires';
$string['externalservice'] = 'External service';
$string['failedtolog'] = 'Failed to login';
$string['function'] = 'Function';
$string['generalstructure'] = 'General structure';
$string['information'] = 'Information';
287
288
289
290
291
292
293
$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';
294
$string['iprestriction'] = 'IP restriction';
295
$string['list'] = 'list of';
296
297
298
299
$string['key'] = 'Key';
$string['missingpassword'] = 'Missing password';
$string['missingusername'] = 'Missing username';
$string['notoken'] = 'The token list is empty.';
300
$string['nowsprotocolsenabled'] = 'No web service protocols are enabled. You need at least one <a href="%s">protocol</a> enabled.';
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
$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';
316
$string['fortokenusers'] = 'User token access';
317
$string['usertokens'] = 'Personal user tokens';
318
$string['serviceaccess'] = 'Service access';
319
320
321
$string['tokenclient'] = 'Client app';
$string['tokenclientunknown'] = '(Not specified)';
$string['tokenmanuallycreated'] = 'Manually created';
322
323
324
325
326
327
328
329
$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';
330
331
332
$string['servicenamelabel'] = 'Name';
$string['servicenamedesc'] = 'A human-readable name for this service group.';
$string['serviceshortnamelabel'] = 'Short name';
333
334
$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.';
$string['servicecomponentnote'] = 'This service provides functionality for the component %s';
335
336
337
$string['simpleauthlog'] = 'Simple authentication login';
$string['step'] = 'Step';
$string['testclient'] = 'Web service test client';
338
$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}.';
339
340
341
342
343
344
345
346
347
348
$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';
349
$string['webservicesenabled'] = 'Web services enabled';
350
$string['webservicesnotenabled'] = 'You need to enable at least one protocol';
351
352
353
354

// Web Service functions errors
$string['nooauth'] = 'Not enabled for OAuth';
$string['accessdenied'] = 'access denied';
355
356
357
358
359
360
$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"';
$string['usernameexists'] = 'Username already exists "%s"';
$string['invalidauthtype'] = 'Invalid authentication type "%s"';
$string['invalidauthtypeuser'] = 'Invalid authentication type "%s" with user "%s"';
361
$string['invalidsocialprofile'] = 'Invalid social profile "%s"';
362
$string['instexceedmax'] = 'Institution exceeded maximum allowed "%s"';
363
$string['cannotdeleteaccount'] = 'cannot delete account that has been used and is not suspended. User id "%s"';
364
$string['nousernameorid'] = 'no username or id ';
365
366
367
368
369
370
371
$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"';
372
$string['musthaveid'] = 'Must have id, userid or username';
373
374
375
376
377
$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"';
378
$string['noname'] = 'no name or shortname specified';
379
380
$string['catinvalid'] = 'category "%s" invalid';
$string['invalidjointype'] = 'invalid join type combination "%s"';
381
$string['correctjointype'] = 'must select correct join type open, request, and/or controlled';
382
383
384
385
$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"';
386
$string['nogroup'] = 'no group specified';
387
$string['membersinvalidaction'] = 'invalid action "%s" for user "%s" on group "%s"';