@twin.org/rights-management-plugins 0.0.3-next.10
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.
- package/LICENSE +201 -0
- package/README.md +21 -0
- package/dist/es/index.js +21 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/models/IExampleDataAccessHandlerConstructorOptions.js +4 -0
- package/dist/es/models/IExampleDataAccessHandlerConstructorOptions.js.map +1 -0
- package/dist/es/models/IExamplePolicyArbiterConstructorOptions.js +4 -0
- package/dist/es/models/IExamplePolicyArbiterConstructorOptions.js.map +1 -0
- package/dist/es/models/IExamplePolicyEnforcementProcessorConstructorOptions.js +4 -0
- package/dist/es/models/IExamplePolicyEnforcementProcessorConstructorOptions.js.map +1 -0
- package/dist/es/models/IExamplePolicyNegotiatorConstructorOptions.js +4 -0
- package/dist/es/models/IExamplePolicyNegotiatorConstructorOptions.js.map +1 -0
- package/dist/es/models/IExamplePolicyRequesterConstructorOptions.js +4 -0
- package/dist/es/models/IExamplePolicyRequesterConstructorOptions.js.map +1 -0
- package/dist/es/models/IIdentityPolicyInformationSourceConstructorOptions.js +4 -0
- package/dist/es/models/IIdentityPolicyInformationSourceConstructorOptions.js.map +1 -0
- package/dist/es/models/ILoggingPolicyExecutionActionConfig.js +2 -0
- package/dist/es/models/ILoggingPolicyExecutionActionConfig.js.map +1 -0
- package/dist/es/models/ILoggingPolicyExecutionActionConstructorOptions.js +2 -0
- package/dist/es/models/ILoggingPolicyExecutionActionConstructorOptions.js.map +1 -0
- package/dist/es/models/IStaticPolicyInformationSource.js +2 -0
- package/dist/es/models/IStaticPolicyInformationSource.js.map +1 -0
- package/dist/es/models/IStaticPolicyInformationSourceConfig.js +2 -0
- package/dist/es/models/IStaticPolicyInformationSourceConfig.js.map +1 -0
- package/dist/es/models/IStaticPolicyInformationSourceConstructorOptions.js +2 -0
- package/dist/es/models/IStaticPolicyInformationSourceConstructorOptions.js.map +1 -0
- package/dist/es/policyArbiters/examplePolicyArbiter.js +50 -0
- package/dist/es/policyArbiters/examplePolicyArbiter.js.map +1 -0
- package/dist/es/policyEnforcementProcessor/examplePolicyEnforcementProcessor.js +42 -0
- package/dist/es/policyEnforcementProcessor/examplePolicyEnforcementProcessor.js.map +1 -0
- package/dist/es/policyExecutionActions/loggingPolicyExecutionAction.js +117 -0
- package/dist/es/policyExecutionActions/loggingPolicyExecutionAction.js.map +1 -0
- package/dist/es/policyInformationSources/identityPolicyInformationSource.js +79 -0
- package/dist/es/policyInformationSources/identityPolicyInformationSource.js.map +1 -0
- package/dist/es/policyInformationSources/staticPolicyInformationSource.js +94 -0
- package/dist/es/policyInformationSources/staticPolicyInformationSource.js.map +1 -0
- package/dist/es/policyNegotiators/examplePolicyNegotiator.js +61 -0
- package/dist/es/policyNegotiators/examplePolicyNegotiator.js.map +1 -0
- package/dist/es/policyRequesters/examplePolicyRequester.js +69 -0
- package/dist/es/policyRequesters/examplePolicyRequester.js.map +1 -0
- package/dist/types/index.d.ts +18 -0
- package/dist/types/models/IExampleDataAccessHandlerConstructorOptions.d.ts +10 -0
- package/dist/types/models/IExamplePolicyArbiterConstructorOptions.d.ts +10 -0
- package/dist/types/models/IExamplePolicyEnforcementProcessorConstructorOptions.d.ts +10 -0
- package/dist/types/models/IExamplePolicyNegotiatorConstructorOptions.d.ts +10 -0
- package/dist/types/models/IExamplePolicyRequesterConstructorOptions.d.ts +10 -0
- package/dist/types/models/IIdentityPolicyInformationSourceConstructorOptions.d.ts +15 -0
- package/dist/types/models/ILoggingPolicyExecutionActionConfig.d.ts +25 -0
- package/dist/types/models/ILoggingPolicyExecutionActionConstructorOptions.d.ts +15 -0
- package/dist/types/models/IStaticPolicyInformationSource.d.ts +20 -0
- package/dist/types/models/IStaticPolicyInformationSourceConfig.d.ts +10 -0
- package/dist/types/models/IStaticPolicyInformationSourceConstructorOptions.d.ts +15 -0
- package/dist/types/policyArbiters/examplePolicyArbiter.d.ts +36 -0
- package/dist/types/policyEnforcementProcessor/examplePolicyEnforcementProcessor.d.ts +29 -0
- package/dist/types/policyExecutionActions/loggingPolicyExecutionAction.d.ts +49 -0
- package/dist/types/policyInformationSources/identityPolicyInformationSource.d.ts +32 -0
- package/dist/types/policyInformationSources/staticPolicyInformationSource.d.ts +38 -0
- package/dist/types/policyNegotiators/examplePolicyNegotiator.d.ts +45 -0
- package/dist/types/policyRequesters/examplePolicyRequester.d.ts +53 -0
- package/docs/changelog.md +102 -0
- package/docs/examples.md +1 -0
- package/docs/reference/classes/ExamplePolicyArbiter.md +121 -0
- package/docs/reference/classes/ExamplePolicyEnforcementProcessor.md +101 -0
- package/docs/reference/classes/ExamplePolicyNegotiator.md +143 -0
- package/docs/reference/classes/ExamplePolicyRequester.md +187 -0
- package/docs/reference/classes/IdentityPolicyInformationSource.md +103 -0
- package/docs/reference/classes/LoggingPolicyExecutionAction.md +127 -0
- package/docs/reference/classes/StaticPolicyInformationSource.md +123 -0
- package/docs/reference/index.md +25 -0
- package/docs/reference/interfaces/IExampleDataAccessHandlerConstructorOptions.md +17 -0
- package/docs/reference/interfaces/IExamplePolicyArbiterConstructorOptions.md +17 -0
- package/docs/reference/interfaces/IExamplePolicyEnforcementProcessorConstructorOptions.md +17 -0
- package/docs/reference/interfaces/IExamplePolicyNegotiatorConstructorOptions.md +17 -0
- package/docs/reference/interfaces/IExamplePolicyRequesterConstructorOptions.md +17 -0
- package/docs/reference/interfaces/IIdentityPolicyInformationSourceConstructorOptions.md +31 -0
- package/docs/reference/interfaces/ILoggingPolicyExecutionActionConfig.md +53 -0
- package/docs/reference/interfaces/ILoggingPolicyExecutionActionConstructorOptions.md +25 -0
- package/docs/reference/interfaces/IStaticPolicyInformationSource.md +28 -0
- package/docs/reference/interfaces/IStaticPolicyInformationSourceConfig.md +11 -0
- package/docs/reference/interfaces/IStaticPolicyInformationSourceConstructorOptions.md +25 -0
- package/locales/en.json +20 -0
- package/package.json +57 -0
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
# Class: ExamplePolicyRequester
|
|
2
|
+
|
|
3
|
+
Example Policy Requester.
|
|
4
|
+
|
|
5
|
+
## Implements
|
|
6
|
+
|
|
7
|
+
- `IPolicyRequester`
|
|
8
|
+
|
|
9
|
+
## Constructors
|
|
10
|
+
|
|
11
|
+
### Constructor
|
|
12
|
+
|
|
13
|
+
> **new ExamplePolicyRequester**(`options?`): `ExamplePolicyRequester`
|
|
14
|
+
|
|
15
|
+
Create a new instance of ExamplePolicyRequester.
|
|
16
|
+
|
|
17
|
+
#### Parameters
|
|
18
|
+
|
|
19
|
+
##### options?
|
|
20
|
+
|
|
21
|
+
[`IExamplePolicyRequesterConstructorOptions`](../interfaces/IExamplePolicyRequesterConstructorOptions.md)
|
|
22
|
+
|
|
23
|
+
The options for the example policy Requester.
|
|
24
|
+
|
|
25
|
+
#### Returns
|
|
26
|
+
|
|
27
|
+
`ExamplePolicyRequester`
|
|
28
|
+
|
|
29
|
+
## Properties
|
|
30
|
+
|
|
31
|
+
### CLASS\_NAME
|
|
32
|
+
|
|
33
|
+
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
34
|
+
|
|
35
|
+
The class name of the Example Policy Requester.
|
|
36
|
+
|
|
37
|
+
## Methods
|
|
38
|
+
|
|
39
|
+
### className()
|
|
40
|
+
|
|
41
|
+
> **className**(): `string`
|
|
42
|
+
|
|
43
|
+
Returns the class name of the component.
|
|
44
|
+
|
|
45
|
+
#### Returns
|
|
46
|
+
|
|
47
|
+
`string`
|
|
48
|
+
|
|
49
|
+
The class name of the component.
|
|
50
|
+
|
|
51
|
+
#### Implementation of
|
|
52
|
+
|
|
53
|
+
`IPolicyRequester.className`
|
|
54
|
+
|
|
55
|
+
***
|
|
56
|
+
|
|
57
|
+
### requesterId()
|
|
58
|
+
|
|
59
|
+
> **requesterId**(): `string`
|
|
60
|
+
|
|
61
|
+
The unique id of the requester.
|
|
62
|
+
|
|
63
|
+
#### Returns
|
|
64
|
+
|
|
65
|
+
`string`
|
|
66
|
+
|
|
67
|
+
The requester id.
|
|
68
|
+
|
|
69
|
+
#### Implementation of
|
|
70
|
+
|
|
71
|
+
`IPolicyRequester.requesterId`
|
|
72
|
+
|
|
73
|
+
***
|
|
74
|
+
|
|
75
|
+
### offer()
|
|
76
|
+
|
|
77
|
+
> **offer**(`negotiationId`, `offer`): `Promise`\<`boolean`\>
|
|
78
|
+
|
|
79
|
+
A policy has been offered by a provider, let the requester know about it.
|
|
80
|
+
|
|
81
|
+
#### Parameters
|
|
82
|
+
|
|
83
|
+
##### negotiationId
|
|
84
|
+
|
|
85
|
+
`string`
|
|
86
|
+
|
|
87
|
+
The id of the negotiation.
|
|
88
|
+
|
|
89
|
+
##### offer
|
|
90
|
+
|
|
91
|
+
`IOdrlOffer`
|
|
92
|
+
|
|
93
|
+
The offer sent by the provider.
|
|
94
|
+
|
|
95
|
+
#### Returns
|
|
96
|
+
|
|
97
|
+
`Promise`\<`boolean`\>
|
|
98
|
+
|
|
99
|
+
True if the offer was accepted, false otherwise.
|
|
100
|
+
|
|
101
|
+
#### Implementation of
|
|
102
|
+
|
|
103
|
+
`IPolicyRequester.offer`
|
|
104
|
+
|
|
105
|
+
***
|
|
106
|
+
|
|
107
|
+
### agreement()
|
|
108
|
+
|
|
109
|
+
> **agreement**(`negotiationId`, `agreement`): `Promise`\<`boolean`\>
|
|
110
|
+
|
|
111
|
+
A policy agreement has been sent by a provider, let the requester know about it.
|
|
112
|
+
|
|
113
|
+
#### Parameters
|
|
114
|
+
|
|
115
|
+
##### negotiationId
|
|
116
|
+
|
|
117
|
+
`string`
|
|
118
|
+
|
|
119
|
+
The id of the negotiation.
|
|
120
|
+
|
|
121
|
+
##### agreement
|
|
122
|
+
|
|
123
|
+
`IOdrlAgreement`
|
|
124
|
+
|
|
125
|
+
The agreement sent by the provider.
|
|
126
|
+
|
|
127
|
+
#### Returns
|
|
128
|
+
|
|
129
|
+
`Promise`\<`boolean`\>
|
|
130
|
+
|
|
131
|
+
True if the agreement was accepted, false otherwise.
|
|
132
|
+
|
|
133
|
+
#### Implementation of
|
|
134
|
+
|
|
135
|
+
`IPolicyRequester.agreement`
|
|
136
|
+
|
|
137
|
+
***
|
|
138
|
+
|
|
139
|
+
### finalised()
|
|
140
|
+
|
|
141
|
+
> **finalised**(`negotiationId`): `Promise`\<`void`\>
|
|
142
|
+
|
|
143
|
+
A policy finalisation has been sent by a provider, let the requester know about it.
|
|
144
|
+
|
|
145
|
+
#### Parameters
|
|
146
|
+
|
|
147
|
+
##### negotiationId
|
|
148
|
+
|
|
149
|
+
`string`
|
|
150
|
+
|
|
151
|
+
The id of the negotiation.
|
|
152
|
+
|
|
153
|
+
#### Returns
|
|
154
|
+
|
|
155
|
+
`Promise`\<`void`\>
|
|
156
|
+
|
|
157
|
+
Nothing.
|
|
158
|
+
|
|
159
|
+
#### Implementation of
|
|
160
|
+
|
|
161
|
+
`IPolicyRequester.finalised`
|
|
162
|
+
|
|
163
|
+
***
|
|
164
|
+
|
|
165
|
+
### terminated()
|
|
166
|
+
|
|
167
|
+
> **terminated**(`negotiationId`): `Promise`\<`void`\>
|
|
168
|
+
|
|
169
|
+
A policy termination has been sent by a provider, let the requester know about it.
|
|
170
|
+
|
|
171
|
+
#### Parameters
|
|
172
|
+
|
|
173
|
+
##### negotiationId
|
|
174
|
+
|
|
175
|
+
`string`
|
|
176
|
+
|
|
177
|
+
The id of the negotiation.
|
|
178
|
+
|
|
179
|
+
#### Returns
|
|
180
|
+
|
|
181
|
+
`Promise`\<`void`\>
|
|
182
|
+
|
|
183
|
+
Nothing.
|
|
184
|
+
|
|
185
|
+
#### Implementation of
|
|
186
|
+
|
|
187
|
+
`IPolicyRequester.terminated`
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Class: IdentityPolicyInformationSource
|
|
2
|
+
|
|
3
|
+
Policy information source which retrieves the identity information.
|
|
4
|
+
|
|
5
|
+
## Implements
|
|
6
|
+
|
|
7
|
+
- `IPolicyInformationSource`
|
|
8
|
+
|
|
9
|
+
## Constructors
|
|
10
|
+
|
|
11
|
+
### Constructor
|
|
12
|
+
|
|
13
|
+
> **new IdentityPolicyInformationSource**(`options?`): `IdentityPolicyInformationSource`
|
|
14
|
+
|
|
15
|
+
Create a new instance of IdentityPolicyInformationSource.
|
|
16
|
+
|
|
17
|
+
#### Parameters
|
|
18
|
+
|
|
19
|
+
##### options?
|
|
20
|
+
|
|
21
|
+
[`IIdentityPolicyInformationSourceConstructorOptions`](../interfaces/IIdentityPolicyInformationSourceConstructorOptions.md)
|
|
22
|
+
|
|
23
|
+
The options for the logging policy source.
|
|
24
|
+
|
|
25
|
+
#### Returns
|
|
26
|
+
|
|
27
|
+
`IdentityPolicyInformationSource`
|
|
28
|
+
|
|
29
|
+
## Properties
|
|
30
|
+
|
|
31
|
+
### CLASS\_NAME
|
|
32
|
+
|
|
33
|
+
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
34
|
+
|
|
35
|
+
The class name of the Identity Policy Information Source.
|
|
36
|
+
|
|
37
|
+
## Methods
|
|
38
|
+
|
|
39
|
+
### className()
|
|
40
|
+
|
|
41
|
+
> **className**(): `string`
|
|
42
|
+
|
|
43
|
+
Returns the class name of the component.
|
|
44
|
+
|
|
45
|
+
#### Returns
|
|
46
|
+
|
|
47
|
+
`string`
|
|
48
|
+
|
|
49
|
+
The class name of the component.
|
|
50
|
+
|
|
51
|
+
#### Implementation of
|
|
52
|
+
|
|
53
|
+
`IPolicyInformationSource.className`
|
|
54
|
+
|
|
55
|
+
***
|
|
56
|
+
|
|
57
|
+
### retrieve()
|
|
58
|
+
|
|
59
|
+
> **retrieve**\<`D`\>(`locator`, `accessMode`, `policies`, `data?`): `Promise`\<`IJsonLdNodeObject`[] \| `undefined`\>
|
|
60
|
+
|
|
61
|
+
Retrieve information from the sources.
|
|
62
|
+
|
|
63
|
+
#### Type Parameters
|
|
64
|
+
|
|
65
|
+
##### D
|
|
66
|
+
|
|
67
|
+
`D` = `unknown`
|
|
68
|
+
|
|
69
|
+
#### Parameters
|
|
70
|
+
|
|
71
|
+
##### locator
|
|
72
|
+
|
|
73
|
+
`IPolicyLocator`
|
|
74
|
+
|
|
75
|
+
The locator to find relevant policies.
|
|
76
|
+
|
|
77
|
+
##### accessMode
|
|
78
|
+
|
|
79
|
+
`PolicyInformationAccessMode`
|
|
80
|
+
|
|
81
|
+
The access mode to use for the retrieval.
|
|
82
|
+
|
|
83
|
+
##### policies
|
|
84
|
+
|
|
85
|
+
`IOdrlPolicy`[]
|
|
86
|
+
|
|
87
|
+
The policies that apply to the data.
|
|
88
|
+
|
|
89
|
+
##### data?
|
|
90
|
+
|
|
91
|
+
`D`
|
|
92
|
+
|
|
93
|
+
The data to process.
|
|
94
|
+
|
|
95
|
+
#### Returns
|
|
96
|
+
|
|
97
|
+
`Promise`\<`IJsonLdNodeObject`[] \| `undefined`\>
|
|
98
|
+
|
|
99
|
+
The objects containing relevant information or undefined if nothing relevant is found.
|
|
100
|
+
|
|
101
|
+
#### Implementation of
|
|
102
|
+
|
|
103
|
+
`IPolicyInformationSource.retrieve`
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# Class: LoggingPolicyExecutionAction
|
|
2
|
+
|
|
3
|
+
Logging Policy Execution Action to send decisions to logging.
|
|
4
|
+
|
|
5
|
+
## Implements
|
|
6
|
+
|
|
7
|
+
- `IPolicyExecutionAction`
|
|
8
|
+
|
|
9
|
+
## Constructors
|
|
10
|
+
|
|
11
|
+
### Constructor
|
|
12
|
+
|
|
13
|
+
> **new LoggingPolicyExecutionAction**(`options?`): `LoggingPolicyExecutionAction`
|
|
14
|
+
|
|
15
|
+
Create a new instance of LoggingPolicyExecutionAction.
|
|
16
|
+
|
|
17
|
+
#### Parameters
|
|
18
|
+
|
|
19
|
+
##### options?
|
|
20
|
+
|
|
21
|
+
[`ILoggingPolicyExecutionActionConstructorOptions`](../interfaces/ILoggingPolicyExecutionActionConstructorOptions.md)
|
|
22
|
+
|
|
23
|
+
The options for the logging policy execution action.
|
|
24
|
+
|
|
25
|
+
#### Returns
|
|
26
|
+
|
|
27
|
+
`LoggingPolicyExecutionAction`
|
|
28
|
+
|
|
29
|
+
## Properties
|
|
30
|
+
|
|
31
|
+
### CLASS\_NAME
|
|
32
|
+
|
|
33
|
+
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
34
|
+
|
|
35
|
+
The class name of the Logging Policy Execution Action.
|
|
36
|
+
|
|
37
|
+
## Methods
|
|
38
|
+
|
|
39
|
+
### className()
|
|
40
|
+
|
|
41
|
+
> **className**(): `string`
|
|
42
|
+
|
|
43
|
+
Returns the class name of the component.
|
|
44
|
+
|
|
45
|
+
#### Returns
|
|
46
|
+
|
|
47
|
+
`string`
|
|
48
|
+
|
|
49
|
+
The class name of the component.
|
|
50
|
+
|
|
51
|
+
#### Implementation of
|
|
52
|
+
|
|
53
|
+
`IPolicyExecutionAction.className`
|
|
54
|
+
|
|
55
|
+
***
|
|
56
|
+
|
|
57
|
+
### supportedStages()
|
|
58
|
+
|
|
59
|
+
> **supportedStages**(): `PolicyDecisionStage`[]
|
|
60
|
+
|
|
61
|
+
Which stages should the action be executed at.
|
|
62
|
+
|
|
63
|
+
#### Returns
|
|
64
|
+
|
|
65
|
+
`PolicyDecisionStage`[]
|
|
66
|
+
|
|
67
|
+
List of stages.
|
|
68
|
+
|
|
69
|
+
#### Implementation of
|
|
70
|
+
|
|
71
|
+
`IPolicyExecutionAction.supportedStages`
|
|
72
|
+
|
|
73
|
+
***
|
|
74
|
+
|
|
75
|
+
### execute()
|
|
76
|
+
|
|
77
|
+
> **execute**\<`D`\>(`stage`, `locator`, `policies?`, `decisions?`, `data?`): `Promise`\<`void`\>
|
|
78
|
+
|
|
79
|
+
Execute function type for policy actions.
|
|
80
|
+
|
|
81
|
+
#### Type Parameters
|
|
82
|
+
|
|
83
|
+
##### D
|
|
84
|
+
|
|
85
|
+
`D` = `unknown`
|
|
86
|
+
|
|
87
|
+
#### Parameters
|
|
88
|
+
|
|
89
|
+
##### stage
|
|
90
|
+
|
|
91
|
+
`PolicyDecisionStage`
|
|
92
|
+
|
|
93
|
+
The stage of the policy decision.
|
|
94
|
+
|
|
95
|
+
##### locator
|
|
96
|
+
|
|
97
|
+
`IPolicyLocator`
|
|
98
|
+
|
|
99
|
+
The locator to find relevant policies.
|
|
100
|
+
|
|
101
|
+
##### policies?
|
|
102
|
+
|
|
103
|
+
`IOdrlPolicy`[]
|
|
104
|
+
|
|
105
|
+
The policies that apply to the data.
|
|
106
|
+
|
|
107
|
+
##### decisions?
|
|
108
|
+
|
|
109
|
+
`IPolicyDecision`[]
|
|
110
|
+
|
|
111
|
+
The decisions made by the PDP.
|
|
112
|
+
|
|
113
|
+
##### data?
|
|
114
|
+
|
|
115
|
+
`D`
|
|
116
|
+
|
|
117
|
+
The data to process.
|
|
118
|
+
|
|
119
|
+
#### Returns
|
|
120
|
+
|
|
121
|
+
`Promise`\<`void`\>
|
|
122
|
+
|
|
123
|
+
A promise that resolves when the action is complete.
|
|
124
|
+
|
|
125
|
+
#### Implementation of
|
|
126
|
+
|
|
127
|
+
`IPolicyExecutionAction.execute`
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# Class: StaticPolicyInformationSource
|
|
2
|
+
|
|
3
|
+
Policy information source which retrieves static information.
|
|
4
|
+
|
|
5
|
+
## Implements
|
|
6
|
+
|
|
7
|
+
- `IPolicyInformationSource`
|
|
8
|
+
|
|
9
|
+
## Constructors
|
|
10
|
+
|
|
11
|
+
### Constructor
|
|
12
|
+
|
|
13
|
+
> **new StaticPolicyInformationSource**(`options?`): `StaticPolicyInformationSource`
|
|
14
|
+
|
|
15
|
+
Create a new instance of StaticPolicyInformationSource.
|
|
16
|
+
|
|
17
|
+
#### Parameters
|
|
18
|
+
|
|
19
|
+
##### options?
|
|
20
|
+
|
|
21
|
+
[`IStaticPolicyInformationSourceConstructorOptions`](../interfaces/IStaticPolicyInformationSourceConstructorOptions.md)
|
|
22
|
+
|
|
23
|
+
The options for the logging policy source.
|
|
24
|
+
|
|
25
|
+
#### Returns
|
|
26
|
+
|
|
27
|
+
`StaticPolicyInformationSource`
|
|
28
|
+
|
|
29
|
+
## Properties
|
|
30
|
+
|
|
31
|
+
### CLASS\_NAME
|
|
32
|
+
|
|
33
|
+
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
34
|
+
|
|
35
|
+
The class name of the Static Policy Information Source.
|
|
36
|
+
|
|
37
|
+
## Methods
|
|
38
|
+
|
|
39
|
+
### className()
|
|
40
|
+
|
|
41
|
+
> **className**(): `string`
|
|
42
|
+
|
|
43
|
+
Returns the class name of the component.
|
|
44
|
+
|
|
45
|
+
#### Returns
|
|
46
|
+
|
|
47
|
+
`string`
|
|
48
|
+
|
|
49
|
+
The class name of the component.
|
|
50
|
+
|
|
51
|
+
#### Implementation of
|
|
52
|
+
|
|
53
|
+
`IPolicyInformationSource.className`
|
|
54
|
+
|
|
55
|
+
***
|
|
56
|
+
|
|
57
|
+
### retrieve()
|
|
58
|
+
|
|
59
|
+
> **retrieve**\<`D`\>(`locator`, `accessMode`, `policies`, `data?`): `Promise`\<`IJsonLdNodeObject`[] \| `undefined`\>
|
|
60
|
+
|
|
61
|
+
Retrieve information from the sources.
|
|
62
|
+
|
|
63
|
+
#### Type Parameters
|
|
64
|
+
|
|
65
|
+
##### D
|
|
66
|
+
|
|
67
|
+
`D` = `unknown`
|
|
68
|
+
|
|
69
|
+
#### Parameters
|
|
70
|
+
|
|
71
|
+
##### locator
|
|
72
|
+
|
|
73
|
+
`IPolicyLocator`
|
|
74
|
+
|
|
75
|
+
The locator to find relevant policies.
|
|
76
|
+
|
|
77
|
+
##### accessMode
|
|
78
|
+
|
|
79
|
+
`PolicyInformationAccessMode`
|
|
80
|
+
|
|
81
|
+
The access mode to use for the retrieval.
|
|
82
|
+
|
|
83
|
+
##### policies
|
|
84
|
+
|
|
85
|
+
`IOdrlPolicy`[]
|
|
86
|
+
|
|
87
|
+
The policies that apply to the data.
|
|
88
|
+
|
|
89
|
+
##### data?
|
|
90
|
+
|
|
91
|
+
`D`
|
|
92
|
+
|
|
93
|
+
The data to process.
|
|
94
|
+
|
|
95
|
+
#### Returns
|
|
96
|
+
|
|
97
|
+
`Promise`\<`IJsonLdNodeObject`[] \| `undefined`\>
|
|
98
|
+
|
|
99
|
+
The objects containing relevant information or undefined if nothing relevant is found.
|
|
100
|
+
|
|
101
|
+
#### Implementation of
|
|
102
|
+
|
|
103
|
+
`IPolicyInformationSource.retrieve`
|
|
104
|
+
|
|
105
|
+
***
|
|
106
|
+
|
|
107
|
+
### addInformation()
|
|
108
|
+
|
|
109
|
+
> **addInformation**(`info`): `void`
|
|
110
|
+
|
|
111
|
+
Add static policy information.
|
|
112
|
+
|
|
113
|
+
#### Parameters
|
|
114
|
+
|
|
115
|
+
##### info
|
|
116
|
+
|
|
117
|
+
[`IStaticPolicyInformationSource`](../interfaces/IStaticPolicyInformationSource.md)
|
|
118
|
+
|
|
119
|
+
The static policy information to add.
|
|
120
|
+
|
|
121
|
+
#### Returns
|
|
122
|
+
|
|
123
|
+
`void`
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# @twin.org/rights-management-plugins
|
|
2
|
+
|
|
3
|
+
## Classes
|
|
4
|
+
|
|
5
|
+
- [ExamplePolicyArbiter](classes/ExamplePolicyArbiter.md)
|
|
6
|
+
- [ExamplePolicyEnforcementProcessor](classes/ExamplePolicyEnforcementProcessor.md)
|
|
7
|
+
- [LoggingPolicyExecutionAction](classes/LoggingPolicyExecutionAction.md)
|
|
8
|
+
- [IdentityPolicyInformationSource](classes/IdentityPolicyInformationSource.md)
|
|
9
|
+
- [StaticPolicyInformationSource](classes/StaticPolicyInformationSource.md)
|
|
10
|
+
- [ExamplePolicyNegotiator](classes/ExamplePolicyNegotiator.md)
|
|
11
|
+
- [ExamplePolicyRequester](classes/ExamplePolicyRequester.md)
|
|
12
|
+
|
|
13
|
+
## Interfaces
|
|
14
|
+
|
|
15
|
+
- [IExampleDataAccessHandlerConstructorOptions](interfaces/IExampleDataAccessHandlerConstructorOptions.md)
|
|
16
|
+
- [IExamplePolicyArbiterConstructorOptions](interfaces/IExamplePolicyArbiterConstructorOptions.md)
|
|
17
|
+
- [IExamplePolicyEnforcementProcessorConstructorOptions](interfaces/IExamplePolicyEnforcementProcessorConstructorOptions.md)
|
|
18
|
+
- [IExamplePolicyNegotiatorConstructorOptions](interfaces/IExamplePolicyNegotiatorConstructorOptions.md)
|
|
19
|
+
- [IExamplePolicyRequesterConstructorOptions](interfaces/IExamplePolicyRequesterConstructorOptions.md)
|
|
20
|
+
- [IIdentityPolicyInformationSourceConstructorOptions](interfaces/IIdentityPolicyInformationSourceConstructorOptions.md)
|
|
21
|
+
- [ILoggingPolicyExecutionActionConfig](interfaces/ILoggingPolicyExecutionActionConfig.md)
|
|
22
|
+
- [ILoggingPolicyExecutionActionConstructorOptions](interfaces/ILoggingPolicyExecutionActionConstructorOptions.md)
|
|
23
|
+
- [IStaticPolicyInformationSource](interfaces/IStaticPolicyInformationSource.md)
|
|
24
|
+
- [IStaticPolicyInformationSourceConfig](interfaces/IStaticPolicyInformationSourceConfig.md)
|
|
25
|
+
- [IStaticPolicyInformationSourceConstructorOptions](interfaces/IStaticPolicyInformationSourceConstructorOptions.md)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Interface: IExampleDataAccessHandlerConstructorOptions
|
|
2
|
+
|
|
3
|
+
Options for the Example Data Access Handler.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### loggingComponentType?
|
|
8
|
+
|
|
9
|
+
> `optional` **loggingComponentType**: `string`
|
|
10
|
+
|
|
11
|
+
The logging component for data access handler.
|
|
12
|
+
|
|
13
|
+
#### Default
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
logging
|
|
17
|
+
```
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Interface: IExamplePolicyArbiterConstructorOptions
|
|
2
|
+
|
|
3
|
+
Options for the Example Policy Arbiter.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### loggingComponentType?
|
|
8
|
+
|
|
9
|
+
> `optional` **loggingComponentType**: `string`
|
|
10
|
+
|
|
11
|
+
The logging component for policy arbiter.
|
|
12
|
+
|
|
13
|
+
#### Default
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
logging
|
|
17
|
+
```
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Interface: IExamplePolicyEnforcementProcessorConstructorOptions
|
|
2
|
+
|
|
3
|
+
Options for the Example Policy Enforcement Processor.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### loggingComponentType?
|
|
8
|
+
|
|
9
|
+
> `optional` **loggingComponentType**: `string`
|
|
10
|
+
|
|
11
|
+
The logging component for policy enforcement processor.
|
|
12
|
+
|
|
13
|
+
#### Default
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
logging
|
|
17
|
+
```
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Interface: IExamplePolicyNegotiatorConstructorOptions
|
|
2
|
+
|
|
3
|
+
Options for the Example Policy Negotiator.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### loggingComponentType?
|
|
8
|
+
|
|
9
|
+
> `optional` **loggingComponentType**: `string`
|
|
10
|
+
|
|
11
|
+
The logging component for policy negotiator.
|
|
12
|
+
|
|
13
|
+
#### Default
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
logging
|
|
17
|
+
```
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Interface: IExamplePolicyRequesterConstructorOptions
|
|
2
|
+
|
|
3
|
+
Options for the Example Policy Requester.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### loggingComponentType?
|
|
8
|
+
|
|
9
|
+
> `optional` **loggingComponentType**: `string`
|
|
10
|
+
|
|
11
|
+
The logging component for policy requester.
|
|
12
|
+
|
|
13
|
+
#### Default
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
logging
|
|
17
|
+
```
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Interface: IIdentityPolicyInformationSourceConstructorOptions
|
|
2
|
+
|
|
3
|
+
Options for the Identity Policy Information Source Component.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### loggingComponentType?
|
|
8
|
+
|
|
9
|
+
> `optional` **loggingComponentType**: `string`
|
|
10
|
+
|
|
11
|
+
The logging component for logging policy source.
|
|
12
|
+
|
|
13
|
+
#### Default
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
logging
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
***
|
|
20
|
+
|
|
21
|
+
### identityResolverComponentType?
|
|
22
|
+
|
|
23
|
+
> `optional` **identityResolverComponentType**: `string`
|
|
24
|
+
|
|
25
|
+
The component for resolving identities.
|
|
26
|
+
|
|
27
|
+
#### Default
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
identity-resolver
|
|
31
|
+
```
|