Mercurial > hg > orthanc-authorization
comparison README @ 72:e381ba725669
new PUT auth/tokens/{token-type} API route + updated interface with WebService
author | Alain Mazy <am@osimis.io> |
---|---|
date | Fri, 24 Feb 2023 18:13:36 +0100 |
parents | 6190b564622f |
children | 68ce6fd8b22a |
comparison
equal
deleted
inserted
replaced
71:30fb3ce960d9 | 72:e381ba725669 |
---|---|
22 | 22 |
23 Usage details are available as part of the Orthanc Book: | 23 Usage details are available as part of the Orthanc Book: |
24 http://book.orthanc-server.com/plugins/authorization.html | 24 http://book.orthanc-server.com/plugins/authorization.html |
25 | 25 |
26 | 26 |
27 API | |
28 --- | |
29 | |
30 Since version 0.5.0, the plugin implements a RestA API to generate tokens | |
31 (provided that the Web service is able to do so). | |
32 | |
33 Sample Orthanc Flavored API: | |
34 | |
35 curl -X PUT http://localhost:8042/auth/tokens/resource-instant-link -H 'Content-Type: application/json' \ | |
36 -d '{"ID": "toto", | |
37 "Resources" : [{ | |
38 "DicomUid": "1.2", | |
39 "OrthancId": "", | |
40 "Level": "study" | |
41 }], | |
42 "Type": "resource-instant-link", | |
43 "ExpirationDate": "2026-12-31T11:00:00Z"}' | |
44 | |
45 Sample response: | |
46 { | |
47 "Token": "e148.....", | |
48 "Url": null | |
49 } | |
50 | |
51 The API that must be implemented by the webservice is slighlty different wrt naming conventions: | |
52 | |
53 curl -X PUT http://localhost:8000/tokens/resource-instant-link -H 'Content-Type: application/json' \ | |
54 -d '{"id": "toto", | |
55 "resources" : [{ | |
56 "dicom-uid": "1.2", | |
57 "level": "study" | |
58 }], | |
59 "type": "resource-instant-link", | |
60 "expiration-date": "2026-12-31T11:00:00Z"}' | |
61 | |
62 Sample response: | |
63 { | |
64 "token": "e148.....", | |
65 "url": null | |
66 } | |
67 | |
68 | |
69 | |
27 Licensing | 70 Licensing |
28 --------- | 71 --------- |
29 | 72 |
30 The authorization plugin for Orthanc is licensed under the AGPL license. | 73 The authorization plugin for Orthanc is licensed under the AGPL license. |
31 | 74 |