You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: specs/permissions.md
+33-35Lines changed: 33 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,25 +12,24 @@ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "S
12
12
The canonical model for a permissions document is a JSON [JSON] object. When serialized in a JSON document, that format is identified with the "application/permissions+json" media type.
13
13
14
14
```json
15
-
{
16
-
"permissions": {
17
-
"PrintSettings.Read.All": {
18
-
"schemes": {
19
-
"DelegatedWork": {
20
-
"type": "DelegatedWork",
21
-
"description": "Allow signed in user to read print settings",
22
-
}
23
-
},
24
-
"pathSets": [
25
-
{
26
-
"schemes": ["DelegatedWork"],
27
-
"methods": ["GET"],
28
-
"paths": {
29
-
"/print/settings": {}
30
-
}
31
-
}
32
-
]
33
-
}
15
+
{
16
+
"permissions": {
17
+
"PrintSettings.Read.All": {
18
+
"schemes": {
19
+
"DelegatedWork": {
20
+
"type": "DelegatedWork",
21
+
"description": "Allow signed in user to read print settings"
22
+
}
23
+
},
24
+
"pathSets": [{
25
+
"schemes": ["DelegatedWork"],
26
+
"methods": ["GET"],
27
+
"paths": {
28
+
"/print/settings": {}
29
+
}
30
+
}]
31
+
}
32
+
}
34
33
}
35
34
```
36
35
In this example, the claim "PrintSettings.Read.All" is required when using the "DelegatedWork" security scheme to access the resource "/print/settings" using the "GET" method.
@@ -83,22 +82,21 @@ A pathSet object identifies a set of paths that are accessible via the identifie
83
82
> Note: The design chosen was intentional to encourage permission creators to ensure support for methods and schemes is as consistent as possible. This produces a better developer experience for API consumers.
0 commit comments