liblynx-api 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +53 -0
- data/LICENSE +21 -0
- data/README.md +33 -0
- data/Rakefile +35 -0
- data/api.md +713 -0
- data/config.json +7 -0
- data/config/config.rb +13 -0
- data/lib/liblynx-api.rb +22 -0
- data/lib/liblynx-api/client.rb +1153 -0
- data/lib/liblynx-api/version.rb +5 -0
- data/liblynx-api.gemspec +27 -0
- data/meta.json +11 -0
- data/schema.json +905 -0
- data/schemata/account.json +429 -0
- data/schemata/identification.json +239 -0
- data/schemata/samlidps.json +140 -0
- data/schemata/token.json +68 -0
- data/spec/client_spec.rb +110 -0
- metadata +162 -0
data/liblynx-api.gemspec
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
|
2
|
+
# -*- encoding: utf-8 -*-
|
3
|
+
require File.expand_path('../lib/liblynx-api/version', __FILE__)
|
4
|
+
|
5
|
+
Gem::Specification.new do |gem|
|
6
|
+
gem.authors = ['Denis Sablic']
|
7
|
+
gem.email = ['denis.sablic@gmail.com']
|
8
|
+
gem.homepage = 'https://github.com/dsablic/liblynx-api'
|
9
|
+
gem.summary = 'Ruby client for the LibLynx API'
|
10
|
+
gem.license = 'MIT'
|
11
|
+
|
12
|
+
gem.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
13
|
+
gem.files = `git ls-files`.split("\n")
|
14
|
+
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
15
|
+
gem.name = 'liblynx-api'
|
16
|
+
gem.require_paths = ['lib']
|
17
|
+
gem.version = LibLynxAPI::VERSION
|
18
|
+
|
19
|
+
gem.add_development_dependency 'bundler'
|
20
|
+
gem.add_development_dependency 'rake', '< 11.0'
|
21
|
+
gem.add_development_dependency 'rspec'
|
22
|
+
gem.add_development_dependency 'prmd'
|
23
|
+
gem.add_development_dependency 'yard'
|
24
|
+
|
25
|
+
gem.add_dependency 'heroics'
|
26
|
+
gem.add_dependency 'moneta'
|
27
|
+
end
|
data/meta.json
ADDED
data/schema.json
ADDED
@@ -0,0 +1,905 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://interagent.github.io/interagent-hyper-schema",
|
3
|
+
"type": [
|
4
|
+
"object"
|
5
|
+
],
|
6
|
+
"definitions": {
|
7
|
+
"account": {
|
8
|
+
"$schema": "http://json-schema.org/draft-04/hyper-schema",
|
9
|
+
"title": "Account",
|
10
|
+
"description": "",
|
11
|
+
"stability": "production",
|
12
|
+
"strictProperties": true,
|
13
|
+
"type": [
|
14
|
+
"object"
|
15
|
+
],
|
16
|
+
"definitions": {
|
17
|
+
"id": {
|
18
|
+
"description": "unique identifier of account",
|
19
|
+
"readOnly": true,
|
20
|
+
"type": [
|
21
|
+
"integer"
|
22
|
+
]
|
23
|
+
},
|
24
|
+
"account_name": {
|
25
|
+
"description": "unique name of account",
|
26
|
+
"type": [
|
27
|
+
"string"
|
28
|
+
]
|
29
|
+
},
|
30
|
+
"email_domains": {
|
31
|
+
"description": "cr separated email domains",
|
32
|
+
"example": "*.somedomain.com\nalt.somedomain2.com",
|
33
|
+
"type": [
|
34
|
+
"string"
|
35
|
+
]
|
36
|
+
},
|
37
|
+
"enable_saml": {
|
38
|
+
"description": "enable saml",
|
39
|
+
"type": [
|
40
|
+
"boolean"
|
41
|
+
]
|
42
|
+
},
|
43
|
+
"enable_shibboleth": {
|
44
|
+
"description": "enable shibboleth",
|
45
|
+
"type": [
|
46
|
+
"boolean"
|
47
|
+
]
|
48
|
+
},
|
49
|
+
"enable_ip": {
|
50
|
+
"description": "enable ip",
|
51
|
+
"type": [
|
52
|
+
"boolean"
|
53
|
+
]
|
54
|
+
},
|
55
|
+
"enable_referrer": {
|
56
|
+
"description": "enable referrer",
|
57
|
+
"type": [
|
58
|
+
"boolean"
|
59
|
+
]
|
60
|
+
},
|
61
|
+
"enable_library_card": {
|
62
|
+
"description": "enable library card",
|
63
|
+
"type": [
|
64
|
+
"boolean"
|
65
|
+
]
|
66
|
+
},
|
67
|
+
"enable_individual": {
|
68
|
+
"description": "enable individual",
|
69
|
+
"type": [
|
70
|
+
"boolean"
|
71
|
+
]
|
72
|
+
},
|
73
|
+
"enable_open_athens": {
|
74
|
+
"description": "enable open athens",
|
75
|
+
"type": [
|
76
|
+
"boolean"
|
77
|
+
]
|
78
|
+
},
|
79
|
+
"enable_archimed": {
|
80
|
+
"description": "enable archimed",
|
81
|
+
"type": [
|
82
|
+
"boolean"
|
83
|
+
]
|
84
|
+
},
|
85
|
+
"active": {
|
86
|
+
"description": "active",
|
87
|
+
"type": [
|
88
|
+
"boolean"
|
89
|
+
]
|
90
|
+
},
|
91
|
+
"enable_pass_code": {
|
92
|
+
"description": "enable pass code",
|
93
|
+
"type": [
|
94
|
+
"boolean"
|
95
|
+
]
|
96
|
+
},
|
97
|
+
"enable_self_registration": {
|
98
|
+
"description": "enable self registration",
|
99
|
+
"type": [
|
100
|
+
"boolean"
|
101
|
+
]
|
102
|
+
},
|
103
|
+
"enable_lib_portal_stats": {
|
104
|
+
"description": "enable lib portal stats",
|
105
|
+
"type": [
|
106
|
+
"boolean"
|
107
|
+
]
|
108
|
+
},
|
109
|
+
"individual_limit": {
|
110
|
+
"description": "individual limit",
|
111
|
+
"type": [
|
112
|
+
"integer"
|
113
|
+
]
|
114
|
+
},
|
115
|
+
"individual": {
|
116
|
+
"description": "individual",
|
117
|
+
"type": [
|
118
|
+
"boolean"
|
119
|
+
]
|
120
|
+
},
|
121
|
+
"type": {
|
122
|
+
"description": "type",
|
123
|
+
"type": [
|
124
|
+
"string"
|
125
|
+
]
|
126
|
+
},
|
127
|
+
"identity": {
|
128
|
+
"$ref": "#/definitions/account/definitions/id"
|
129
|
+
},
|
130
|
+
"creation_date": {
|
131
|
+
"description": "when account was created",
|
132
|
+
"readOnly": true,
|
133
|
+
"format": "date-time",
|
134
|
+
"type": [
|
135
|
+
"string"
|
136
|
+
]
|
137
|
+
},
|
138
|
+
"modified_date": {
|
139
|
+
"description": "when account was updated",
|
140
|
+
"readOnly": true,
|
141
|
+
"format": "date-time",
|
142
|
+
"type": [
|
143
|
+
"string"
|
144
|
+
]
|
145
|
+
},
|
146
|
+
"publisher_reference": {
|
147
|
+
"description": "publisher reference",
|
148
|
+
"type": [
|
149
|
+
"string"
|
150
|
+
]
|
151
|
+
},
|
152
|
+
"shibboleth_entity_id": {
|
153
|
+
"description": "shibboleth entity id",
|
154
|
+
"format": "uri",
|
155
|
+
"type": [
|
156
|
+
"string"
|
157
|
+
]
|
158
|
+
}
|
159
|
+
},
|
160
|
+
"links": [
|
161
|
+
{
|
162
|
+
"description": "Create a new account.",
|
163
|
+
"href": "/api/accounts",
|
164
|
+
"method": "POST",
|
165
|
+
"rel": "create",
|
166
|
+
"schema": {
|
167
|
+
"properties": {
|
168
|
+
"account_name": {
|
169
|
+
"$ref": "#/definitions/account/definitions/account_name"
|
170
|
+
},
|
171
|
+
"publisher_reference": {
|
172
|
+
"$ref": "#/definitions/account/definitions/publisher_reference"
|
173
|
+
},
|
174
|
+
"email_domains": {
|
175
|
+
"$ref": "#/definitions/account/definitions/email_domains"
|
176
|
+
},
|
177
|
+
"enable_saml": {
|
178
|
+
"$ref": "#/definitions/account/definitions/enable_saml"
|
179
|
+
},
|
180
|
+
"enable_shibboleth": {
|
181
|
+
"$ref": "#/definitions/account/definitions/enable_shibboleth"
|
182
|
+
},
|
183
|
+
"shibboleth_entity_id": {
|
184
|
+
"$ref": "#/definitions/account/definitions/shibboleth_entity_id"
|
185
|
+
},
|
186
|
+
"enable_ip": {
|
187
|
+
"$ref": "#/definitions/account/definitions/enable_ip"
|
188
|
+
},
|
189
|
+
"enable_pass_code": {
|
190
|
+
"$ref": "#/definitions/account/definitions/enable_pass_code"
|
191
|
+
},
|
192
|
+
"enable_referrer": {
|
193
|
+
"$ref": "#/definitions/account/definitions/enable_referrer"
|
194
|
+
},
|
195
|
+
"enable_library_card": {
|
196
|
+
"$ref": "#/definitions/account/definitions/enable_library_card"
|
197
|
+
},
|
198
|
+
"enable_individual": {
|
199
|
+
"$ref": "#/definitions/account/definitions/enable_individual"
|
200
|
+
},
|
201
|
+
"enable_open_athens": {
|
202
|
+
"$ref": "#/definitions/account/definitions/enable_open_athens"
|
203
|
+
},
|
204
|
+
"enable_archimed": {
|
205
|
+
"$ref": "#/definitions/account/definitions/enable_archimed"
|
206
|
+
},
|
207
|
+
"active": {
|
208
|
+
"$ref": "#/definitions/account/definitions/active"
|
209
|
+
},
|
210
|
+
"enable_self_registration": {
|
211
|
+
"$ref": "#/definitions/account/definitions/enable_self_registration"
|
212
|
+
},
|
213
|
+
"enable_lib_portal_stats": {
|
214
|
+
"$ref": "#/definitions/account/definitions/enable_lib_portal_stats"
|
215
|
+
},
|
216
|
+
"individual_limit": {
|
217
|
+
"$ref": "#/definitions/account/definitions/individual_limit"
|
218
|
+
},
|
219
|
+
"individual": {
|
220
|
+
"$ref": "#/definitions/account/definitions/individual"
|
221
|
+
},
|
222
|
+
"type": {
|
223
|
+
"$ref": "#/definitions/account/definitions/type"
|
224
|
+
}
|
225
|
+
},
|
226
|
+
"required": [
|
227
|
+
"account_name"
|
228
|
+
],
|
229
|
+
"type": [
|
230
|
+
"object"
|
231
|
+
]
|
232
|
+
},
|
233
|
+
"title": "Create"
|
234
|
+
},
|
235
|
+
{
|
236
|
+
"description": "Delete an existing account.",
|
237
|
+
"href": "/api/accounts/{(%23%2Fdefinitions%2Faccount%2Fdefinitions%2Fidentity)}",
|
238
|
+
"method": "DELETE",
|
239
|
+
"rel": "destroy",
|
240
|
+
"title": "Delete",
|
241
|
+
"targetSchema": {
|
242
|
+
}
|
243
|
+
},
|
244
|
+
{
|
245
|
+
"description": "Info for existing account.",
|
246
|
+
"href": "/api/accounts/{(%23%2Fdefinitions%2Faccount%2Fdefinitions%2Fidentity)}",
|
247
|
+
"method": "GET",
|
248
|
+
"rel": "self",
|
249
|
+
"title": "Info"
|
250
|
+
},
|
251
|
+
{
|
252
|
+
"description": "List existing accounts.",
|
253
|
+
"href": "/api/accounts",
|
254
|
+
"method": "GET",
|
255
|
+
"rel": "instances",
|
256
|
+
"targetSchema": {
|
257
|
+
"properties": {
|
258
|
+
"accounts": {
|
259
|
+
"items": {
|
260
|
+
"properties": {
|
261
|
+
"id": {
|
262
|
+
"$ref": "#/definitions/account/definitions/id"
|
263
|
+
},
|
264
|
+
"account_name": {
|
265
|
+
"$ref": "#/definitions/account/definitions/account_name"
|
266
|
+
},
|
267
|
+
"individual": {
|
268
|
+
"$ref": "#/definitions/account/definitions/individual"
|
269
|
+
},
|
270
|
+
"active": {
|
271
|
+
"$ref": "#/definitions/account/definitions/active"
|
272
|
+
},
|
273
|
+
"publisher_reference": {
|
274
|
+
"$ref": "#/definitions/account/definitions/publisher_reference"
|
275
|
+
},
|
276
|
+
"type": {
|
277
|
+
"$ref": "#/definitions/account/definitions/type"
|
278
|
+
},
|
279
|
+
"modified_date": {
|
280
|
+
"$ref": "#/definitions/account/definitions/modified_date"
|
281
|
+
},
|
282
|
+
"creation_date": {
|
283
|
+
"$ref": "#/definitions/account/definitions/creation_date"
|
284
|
+
}
|
285
|
+
}
|
286
|
+
},
|
287
|
+
"type": [
|
288
|
+
"array"
|
289
|
+
]
|
290
|
+
}
|
291
|
+
}
|
292
|
+
},
|
293
|
+
"title": "List"
|
294
|
+
},
|
295
|
+
{
|
296
|
+
"description": "Update an existing account.",
|
297
|
+
"href": "/api/accounts/{(%23%2Fdefinitions%2Faccount%2Fdefinitions%2Fidentity)}",
|
298
|
+
"method": "PUT",
|
299
|
+
"rel": "update",
|
300
|
+
"schema": {
|
301
|
+
"properties": {
|
302
|
+
"account_name": {
|
303
|
+
"$ref": "#/definitions/account/definitions/account_name"
|
304
|
+
},
|
305
|
+
"publisher_reference": {
|
306
|
+
"$ref": "#/definitions/account/definitions/publisher_reference"
|
307
|
+
},
|
308
|
+
"email_domains": {
|
309
|
+
"$ref": "#/definitions/account/definitions/email_domains"
|
310
|
+
},
|
311
|
+
"enable_saml": {
|
312
|
+
"$ref": "#/definitions/account/definitions/enable_saml"
|
313
|
+
},
|
314
|
+
"enable_shibboleth": {
|
315
|
+
"$ref": "#/definitions/account/definitions/enable_shibboleth"
|
316
|
+
},
|
317
|
+
"shibboleth_entity_id": {
|
318
|
+
"$ref": "#/definitions/account/definitions/shibboleth_entity_id"
|
319
|
+
},
|
320
|
+
"enable_ip": {
|
321
|
+
"$ref": "#/definitions/account/definitions/enable_ip"
|
322
|
+
},
|
323
|
+
"enable_pass_code": {
|
324
|
+
"$ref": "#/definitions/account/definitions/enable_pass_code"
|
325
|
+
},
|
326
|
+
"enable_referrer": {
|
327
|
+
"$ref": "#/definitions/account/definitions/enable_referrer"
|
328
|
+
},
|
329
|
+
"enable_library_card": {
|
330
|
+
"$ref": "#/definitions/account/definitions/enable_library_card"
|
331
|
+
},
|
332
|
+
"enable_individual": {
|
333
|
+
"$ref": "#/definitions/account/definitions/enable_individual"
|
334
|
+
},
|
335
|
+
"enable_open_athens": {
|
336
|
+
"$ref": "#/definitions/account/definitions/enable_open_athens"
|
337
|
+
},
|
338
|
+
"enable_archimed": {
|
339
|
+
"$ref": "#/definitions/account/definitions/enable_archimed"
|
340
|
+
},
|
341
|
+
"active": {
|
342
|
+
"$ref": "#/definitions/account/definitions/active"
|
343
|
+
},
|
344
|
+
"enable_self_registration": {
|
345
|
+
"$ref": "#/definitions/account/definitions/enable_self_registration"
|
346
|
+
},
|
347
|
+
"enable_lib_portal_stats": {
|
348
|
+
"$ref": "#/definitions/account/definitions/enable_lib_portal_stats"
|
349
|
+
},
|
350
|
+
"individual_limit": {
|
351
|
+
"$ref": "#/definitions/account/definitions/individual_limit"
|
352
|
+
},
|
353
|
+
"individual": {
|
354
|
+
"$ref": "#/definitions/account/definitions/individual"
|
355
|
+
},
|
356
|
+
"type": {
|
357
|
+
"$ref": "#/definitions/account/definitions/type"
|
358
|
+
}
|
359
|
+
},
|
360
|
+
"type": [
|
361
|
+
"object"
|
362
|
+
]
|
363
|
+
},
|
364
|
+
"title": "Update"
|
365
|
+
}
|
366
|
+
],
|
367
|
+
"properties": {
|
368
|
+
"created_at": {
|
369
|
+
"$ref": "#/definitions/account/definitions/creation_date"
|
370
|
+
},
|
371
|
+
"id": {
|
372
|
+
"$ref": "#/definitions/account/definitions/id"
|
373
|
+
},
|
374
|
+
"name": {
|
375
|
+
"$ref": "#/definitions/account/definitions/account_name"
|
376
|
+
},
|
377
|
+
"publisher_reference": {
|
378
|
+
"$ref": "#/definitions/account/definitions/publisher_reference"
|
379
|
+
},
|
380
|
+
"enable_saml": {
|
381
|
+
"$ref": "#/definitions/account/definitions/enable_saml"
|
382
|
+
},
|
383
|
+
"enable_shibboleth": {
|
384
|
+
"$ref": "#/definitions/account/definitions/enable_shibboleth"
|
385
|
+
},
|
386
|
+
"email_domains": {
|
387
|
+
"$ref": "#/definitions/account/definitions/email_domains"
|
388
|
+
},
|
389
|
+
"updated_at": {
|
390
|
+
"$ref": "#/definitions/account/definitions/modified_date"
|
391
|
+
},
|
392
|
+
"shibboleth_entity_id": {
|
393
|
+
"$ref": "#/definitions/account/definitions/shibboleth_entity_id"
|
394
|
+
},
|
395
|
+
"enable_ip": {
|
396
|
+
"$ref": "#/definitions/account/definitions/enable_ip"
|
397
|
+
},
|
398
|
+
"enable_pass_code": {
|
399
|
+
"$ref": "#/definitions/account/definitions/enable_pass_code"
|
400
|
+
},
|
401
|
+
"enable_referrer": {
|
402
|
+
"$ref": "#/definitions/account/definitions/enable_referrer"
|
403
|
+
},
|
404
|
+
"enable_library_card": {
|
405
|
+
"$ref": "#/definitions/account/definitions/enable_library_card"
|
406
|
+
},
|
407
|
+
"enable_individual": {
|
408
|
+
"$ref": "#/definitions/account/definitions/enable_individual"
|
409
|
+
},
|
410
|
+
"enable_open_athens": {
|
411
|
+
"$ref": "#/definitions/account/definitions/enable_open_athens"
|
412
|
+
},
|
413
|
+
"enable_archimed": {
|
414
|
+
"$ref": "#/definitions/account/definitions/enable_archimed"
|
415
|
+
},
|
416
|
+
"active": {
|
417
|
+
"$ref": "#/definitions/account/definitions/active"
|
418
|
+
},
|
419
|
+
"enable_self_registration": {
|
420
|
+
"$ref": "#/definitions/account/definitions/enable_self_registration"
|
421
|
+
},
|
422
|
+
"enable_lib_portal_stats": {
|
423
|
+
"$ref": "#/definitions/account/definitions/enable_lib_portal_stats"
|
424
|
+
},
|
425
|
+
"individual_limit": {
|
426
|
+
"$ref": "#/definitions/account/definitions/individual_limit"
|
427
|
+
},
|
428
|
+
"individual": {
|
429
|
+
"$ref": "#/definitions/account/definitions/individual"
|
430
|
+
},
|
431
|
+
"type": {
|
432
|
+
"$ref": "#/definitions/account/definitions/type"
|
433
|
+
}
|
434
|
+
}
|
435
|
+
},
|
436
|
+
"identification": {
|
437
|
+
"$schema": "http://json-schema.org/draft-04/hyper-schema",
|
438
|
+
"title": "Identification",
|
439
|
+
"description": "",
|
440
|
+
"stability": "production",
|
441
|
+
"strictProperties": true,
|
442
|
+
"type": [
|
443
|
+
"object"
|
444
|
+
],
|
445
|
+
"definitions": {
|
446
|
+
"id": {
|
447
|
+
"description": "unique identifier of identification",
|
448
|
+
"readOnly": true,
|
449
|
+
"format": "uuid",
|
450
|
+
"type": [
|
451
|
+
"string"
|
452
|
+
]
|
453
|
+
},
|
454
|
+
"identity": {
|
455
|
+
"$ref": "#/definitions/identification/definitions/id"
|
456
|
+
},
|
457
|
+
"created": {
|
458
|
+
"description": "when identification was created",
|
459
|
+
"format": "date-time",
|
460
|
+
"type": [
|
461
|
+
"string"
|
462
|
+
]
|
463
|
+
},
|
464
|
+
"email": {
|
465
|
+
"description": "user email address",
|
466
|
+
"format": "email",
|
467
|
+
"type": [
|
468
|
+
"string"
|
469
|
+
]
|
470
|
+
},
|
471
|
+
"url": {
|
472
|
+
"description": "callback url",
|
473
|
+
"format": "uri",
|
474
|
+
"type": [
|
475
|
+
"string"
|
476
|
+
]
|
477
|
+
},
|
478
|
+
"ip": {
|
479
|
+
"description": "ip address",
|
480
|
+
"format": "ipv4",
|
481
|
+
"type": [
|
482
|
+
"string"
|
483
|
+
]
|
484
|
+
},
|
485
|
+
"user_agent": {
|
486
|
+
"description": "user agent",
|
487
|
+
"type": [
|
488
|
+
"string"
|
489
|
+
]
|
490
|
+
},
|
491
|
+
"status": {
|
492
|
+
"description": "status",
|
493
|
+
"type": [
|
494
|
+
"string"
|
495
|
+
]
|
496
|
+
},
|
497
|
+
"terms": {
|
498
|
+
"description": "terms",
|
499
|
+
"type": [
|
500
|
+
"string"
|
501
|
+
]
|
502
|
+
},
|
503
|
+
"authorizations": {
|
504
|
+
"description": "authorizations",
|
505
|
+
"type": [
|
506
|
+
"array"
|
507
|
+
]
|
508
|
+
},
|
509
|
+
"unit_requests": {
|
510
|
+
"description": "unit requests",
|
511
|
+
"type": [
|
512
|
+
"array"
|
513
|
+
]
|
514
|
+
},
|
515
|
+
"publisher": {
|
516
|
+
"description": "publisher",
|
517
|
+
"properties": {
|
518
|
+
"id": {
|
519
|
+
"type": [
|
520
|
+
"integer"
|
521
|
+
]
|
522
|
+
},
|
523
|
+
"publisher_name": {
|
524
|
+
"type": [
|
525
|
+
"string"
|
526
|
+
]
|
527
|
+
}
|
528
|
+
},
|
529
|
+
"type": [
|
530
|
+
"object"
|
531
|
+
]
|
532
|
+
},
|
533
|
+
"user_institution": {
|
534
|
+
"description": "user institution",
|
535
|
+
"properties": {
|
536
|
+
"id": {
|
537
|
+
"type": [
|
538
|
+
"integer"
|
539
|
+
]
|
540
|
+
},
|
541
|
+
"account_name": {
|
542
|
+
"type": [
|
543
|
+
"string"
|
544
|
+
]
|
545
|
+
},
|
546
|
+
"country_code": {
|
547
|
+
"type": [
|
548
|
+
"string"
|
549
|
+
]
|
550
|
+
},
|
551
|
+
"type": {
|
552
|
+
"type": [
|
553
|
+
"string"
|
554
|
+
]
|
555
|
+
}
|
556
|
+
},
|
557
|
+
"type": [
|
558
|
+
"object"
|
559
|
+
]
|
560
|
+
},
|
561
|
+
"target_account": {
|
562
|
+
"description": "target account",
|
563
|
+
"properties": {
|
564
|
+
"id": {
|
565
|
+
"type": [
|
566
|
+
"integer"
|
567
|
+
]
|
568
|
+
},
|
569
|
+
"account_name": {
|
570
|
+
"type": [
|
571
|
+
"string"
|
572
|
+
]
|
573
|
+
},
|
574
|
+
"individual": {
|
575
|
+
"type": [
|
576
|
+
"boolean"
|
577
|
+
]
|
578
|
+
},
|
579
|
+
"type": {
|
580
|
+
"type": [
|
581
|
+
"string"
|
582
|
+
]
|
583
|
+
},
|
584
|
+
"publisher_reference": {
|
585
|
+
"type": [
|
586
|
+
"string"
|
587
|
+
]
|
588
|
+
}
|
589
|
+
},
|
590
|
+
"type": [
|
591
|
+
"object"
|
592
|
+
]
|
593
|
+
}
|
594
|
+
},
|
595
|
+
"links": [
|
596
|
+
{
|
597
|
+
"description": "create a new identification resource to try and identify an account to link a new session with",
|
598
|
+
"href": "/api/identifications",
|
599
|
+
"method": "POST",
|
600
|
+
"rel": "create",
|
601
|
+
"schema": {
|
602
|
+
"properties": {
|
603
|
+
"email": {
|
604
|
+
"$ref": "#/definitions/identification/definitions/email"
|
605
|
+
},
|
606
|
+
"ip": {
|
607
|
+
"$ref": "#/definitions/identification/definitions/ip"
|
608
|
+
},
|
609
|
+
"user_agent": {
|
610
|
+
"$ref": "#/definitions/identification/definitions/user_agent"
|
611
|
+
},
|
612
|
+
"url": {
|
613
|
+
"$ref": "#/definitions/identification/definitions/url"
|
614
|
+
}
|
615
|
+
},
|
616
|
+
"required": [
|
617
|
+
"ip",
|
618
|
+
"user_agent",
|
619
|
+
"url"
|
620
|
+
],
|
621
|
+
"type": [
|
622
|
+
"object"
|
623
|
+
]
|
624
|
+
},
|
625
|
+
"title": "Create"
|
626
|
+
},
|
627
|
+
{
|
628
|
+
"description": "retrieve a single identification object",
|
629
|
+
"href": "/api/identifications/{(%23%2Fdefinitions%2Fidentification%2Fdefinitions%2Fidentity)}",
|
630
|
+
"method": "GET",
|
631
|
+
"rel": "self",
|
632
|
+
"title": "Info"
|
633
|
+
}
|
634
|
+
],
|
635
|
+
"properties": {
|
636
|
+
"created": {
|
637
|
+
"$ref": "#/definitions/identification/definitions/created"
|
638
|
+
},
|
639
|
+
"id": {
|
640
|
+
"$ref": "#/definitions/identification/definitions/id"
|
641
|
+
},
|
642
|
+
"url": {
|
643
|
+
"$ref": "#/definitions/identification/definitions/url"
|
644
|
+
},
|
645
|
+
"ip": {
|
646
|
+
"$ref": "#/definitions/identification/definitions/ip"
|
647
|
+
},
|
648
|
+
"status": {
|
649
|
+
"$ref": "#/definitions/identification/definitions/status"
|
650
|
+
},
|
651
|
+
"terms": {
|
652
|
+
"$ref": "#/definitions/identification/definitions/terms"
|
653
|
+
},
|
654
|
+
"authorizations": {
|
655
|
+
"$ref": "#/definitions/identification/definitions/authorizations"
|
656
|
+
},
|
657
|
+
"unit_requests": {
|
658
|
+
"$ref": "#/definitions/identification/definitions/unit_requests"
|
659
|
+
},
|
660
|
+
"publisher": {
|
661
|
+
"$ref": "#/definitions/identification/definitions/publisher"
|
662
|
+
},
|
663
|
+
"user_agent": {
|
664
|
+
"$ref": "#/definitions/identification/definitions/user_agent"
|
665
|
+
},
|
666
|
+
"user_institution": {
|
667
|
+
"$ref": "#/definitions/identification/definitions/user_institution"
|
668
|
+
},
|
669
|
+
"target_account": {
|
670
|
+
"$ref": "#/definitions/identification/definitions/target_account"
|
671
|
+
}
|
672
|
+
}
|
673
|
+
},
|
674
|
+
"samlidp": {
|
675
|
+
"$schema": "http://json-schema.org/draft-04/hyper-schema",
|
676
|
+
"title": "Samlidp",
|
677
|
+
"description": "",
|
678
|
+
"stability": "production",
|
679
|
+
"strictProperties": true,
|
680
|
+
"type": [
|
681
|
+
"object"
|
682
|
+
],
|
683
|
+
"definitions": {
|
684
|
+
"id": {
|
685
|
+
"description": "unique identifier of samlidp",
|
686
|
+
"readOnly": true,
|
687
|
+
"type": [
|
688
|
+
"integer"
|
689
|
+
]
|
690
|
+
},
|
691
|
+
"descriptor_url": {
|
692
|
+
"description": "saml descriptor url",
|
693
|
+
"readOnly": true,
|
694
|
+
"type": [
|
695
|
+
"string"
|
696
|
+
]
|
697
|
+
},
|
698
|
+
"xml_descriptor": {
|
699
|
+
"description": "xml descriptor",
|
700
|
+
"readOnly": true,
|
701
|
+
"type": [
|
702
|
+
"string"
|
703
|
+
]
|
704
|
+
},
|
705
|
+
"type": {
|
706
|
+
"description": "type",
|
707
|
+
"readOnly": true,
|
708
|
+
"type": [
|
709
|
+
"string"
|
710
|
+
]
|
711
|
+
},
|
712
|
+
"entity_id": {
|
713
|
+
"description": "entity_id",
|
714
|
+
"readOnly": true,
|
715
|
+
"type": [
|
716
|
+
"string"
|
717
|
+
]
|
718
|
+
},
|
719
|
+
"identity": {
|
720
|
+
"$ref": "#/definitions/samlidp/definitions/id"
|
721
|
+
}
|
722
|
+
},
|
723
|
+
"links": [
|
724
|
+
{
|
725
|
+
"description": "Create a new samlidp.",
|
726
|
+
"href": "/api/accounts/{(%23%2Fdefinitions%2Faccount%2Fdefinitions%2Fidentity)}/samlidps",
|
727
|
+
"method": "POST",
|
728
|
+
"rel": "create",
|
729
|
+
"schema": {
|
730
|
+
"properties": {
|
731
|
+
"descriptor_url": {
|
732
|
+
"$ref": "#/definitions/samlidp/definitions/descriptor_url"
|
733
|
+
}
|
734
|
+
},
|
735
|
+
"required": [
|
736
|
+
"descriptor_url"
|
737
|
+
],
|
738
|
+
"type": [
|
739
|
+
"object"
|
740
|
+
]
|
741
|
+
},
|
742
|
+
"title": "Create"
|
743
|
+
},
|
744
|
+
{
|
745
|
+
"description": "Delete an existing samlidp.",
|
746
|
+
"href": "/api/accounts/{(%23%2Fdefinitions%2Faccount%2Fdefinitions%2Fidentity)}/samlidps/{(%23%2Fdefinitions%2Fsamlidp%2Fdefinitions%2Fidentity)}",
|
747
|
+
"method": "DELETE",
|
748
|
+
"rel": "destroy",
|
749
|
+
"title": "Delete",
|
750
|
+
"targetSchema": {
|
751
|
+
}
|
752
|
+
},
|
753
|
+
{
|
754
|
+
"description": "Info for existing samlidp.",
|
755
|
+
"href": "/api/accounts/{(%23%2Fdefinitions%2Faccount%2Fdefinitions%2Fidentity)}/samlidps/{(%23%2Fdefinitions%2Fsamlidp%2Fdefinitions%2Fidentity)}",
|
756
|
+
"method": "GET",
|
757
|
+
"rel": "self",
|
758
|
+
"title": "Info"
|
759
|
+
},
|
760
|
+
{
|
761
|
+
"description": "List existing samlidps.",
|
762
|
+
"href": "/api/accounts/{(%23%2Fdefinitions%2Faccount%2Fdefinitions%2Fidentity)}/samlidps",
|
763
|
+
"method": "GET",
|
764
|
+
"rel": "instances",
|
765
|
+
"title": "List",
|
766
|
+
"targetSchema": {
|
767
|
+
"properties": {
|
768
|
+
"samlidps": {
|
769
|
+
"items": {
|
770
|
+
"properties": {
|
771
|
+
"id": {
|
772
|
+
"$ref": "#/definitions/samlidp/definitions/id"
|
773
|
+
},
|
774
|
+
"descriptor_url": {
|
775
|
+
"$ref": "#/definitions/samlidp/definitions/descriptor_url"
|
776
|
+
},
|
777
|
+
"xml_descriptor": {
|
778
|
+
"$ref": "#/definitions/samlidp/definitions/xml_descriptor"
|
779
|
+
},
|
780
|
+
"type": {
|
781
|
+
"$ref": "#/definitions/samlidp/definitions/type"
|
782
|
+
},
|
783
|
+
"entity_id": {
|
784
|
+
"$ref": "#/definitions/samlidp/definitions/entity_id"
|
785
|
+
}
|
786
|
+
}
|
787
|
+
},
|
788
|
+
"type": [
|
789
|
+
"array"
|
790
|
+
]
|
791
|
+
}
|
792
|
+
}
|
793
|
+
}
|
794
|
+
}
|
795
|
+
],
|
796
|
+
"properties": {
|
797
|
+
"id": {
|
798
|
+
"$ref": "#/definitions/samlidp/definitions/id"
|
799
|
+
},
|
800
|
+
"descriptor_url": {
|
801
|
+
"$ref": "#/definitions/samlidp/definitions/descriptor_url"
|
802
|
+
},
|
803
|
+
"xml_descriptor": {
|
804
|
+
"$ref": "#/definitions/samlidp/definitions/xml_descriptor"
|
805
|
+
},
|
806
|
+
"type": {
|
807
|
+
"$ref": "#/definitions/samlidp/definitions/type"
|
808
|
+
},
|
809
|
+
"entity_id": {
|
810
|
+
"$ref": "#/definitions/samlidp/definitions/entity_id"
|
811
|
+
}
|
812
|
+
}
|
813
|
+
},
|
814
|
+
"token": {
|
815
|
+
"$schema": "http://json-schema.org/draft-04/hyper-schema",
|
816
|
+
"title": "OAuth2 token",
|
817
|
+
"description": "",
|
818
|
+
"stability": "production",
|
819
|
+
"strictProperties": true,
|
820
|
+
"type": [
|
821
|
+
"object"
|
822
|
+
],
|
823
|
+
"definitions": {
|
824
|
+
"account_token": {
|
825
|
+
"description": "unique identifier of identification",
|
826
|
+
"readOnly": true,
|
827
|
+
"type": [
|
828
|
+
"string"
|
829
|
+
]
|
830
|
+
},
|
831
|
+
"identity": {
|
832
|
+
"$ref": "#/definitions/token/definitions/account_token"
|
833
|
+
},
|
834
|
+
"grant_type": {
|
835
|
+
"description": "grant_type",
|
836
|
+
"example": "client_credentials",
|
837
|
+
"type": [
|
838
|
+
"string"
|
839
|
+
]
|
840
|
+
}
|
841
|
+
},
|
842
|
+
"links": [
|
843
|
+
{
|
844
|
+
"description": "Create a new oauth2 token",
|
845
|
+
"encType": "application/x-www-form-urlencoded",
|
846
|
+
"href": "/oauth/v2/token",
|
847
|
+
"method": "POST",
|
848
|
+
"rel": "create",
|
849
|
+
"schema": {
|
850
|
+
"properties": {
|
851
|
+
"grant_type": {
|
852
|
+
"$ref": "#/definitions/token/definitions/grant_type"
|
853
|
+
}
|
854
|
+
},
|
855
|
+
"required": [
|
856
|
+
"grant_type"
|
857
|
+
],
|
858
|
+
"type": [
|
859
|
+
"object"
|
860
|
+
]
|
861
|
+
},
|
862
|
+
"targetSchema": {
|
863
|
+
"properties": {
|
864
|
+
"account_token": {
|
865
|
+
"$ref": "#/definitions/token/definitions/account_token"
|
866
|
+
}
|
867
|
+
},
|
868
|
+
"type": [
|
869
|
+
"object"
|
870
|
+
]
|
871
|
+
},
|
872
|
+
"title": "Create"
|
873
|
+
}
|
874
|
+
],
|
875
|
+
"properties": {
|
876
|
+
"account_token": {
|
877
|
+
"$ref": "#/definitions/token/definitions/account_token"
|
878
|
+
}
|
879
|
+
}
|
880
|
+
}
|
881
|
+
},
|
882
|
+
"properties": {
|
883
|
+
"account": {
|
884
|
+
"$ref": "#/definitions/account"
|
885
|
+
},
|
886
|
+
"identification": {
|
887
|
+
"$ref": "#/definitions/identification"
|
888
|
+
},
|
889
|
+
"samlidp": {
|
890
|
+
"$ref": "#/definitions/samlidp"
|
891
|
+
},
|
892
|
+
"token": {
|
893
|
+
"$ref": "#/definitions/token"
|
894
|
+
}
|
895
|
+
},
|
896
|
+
"description": "LibLynx API schema",
|
897
|
+
"id": "http://connect.liblynx.com/schema#",
|
898
|
+
"links": [
|
899
|
+
{
|
900
|
+
"href": "https://connect.liblynx.com",
|
901
|
+
"rel": "self"
|
902
|
+
}
|
903
|
+
],
|
904
|
+
"title": "LibLynx API"
|
905
|
+
}
|