@twin.org/rights-management-plugins 0.0.3-next.9 → 0.9.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.
- package/README.md +11 -3
- package/dist/es/index.js +20 -10
- package/dist/es/index.js.map +1 -1
- package/dist/es/models/IAutomationPolicyExecutionActionConfig.js +4 -0
- package/dist/es/models/IAutomationPolicyExecutionActionConfig.js.map +1 -0
- package/dist/es/models/IAutomationPolicyExecutionActionConstructorOptions.js +2 -0
- package/dist/es/models/IAutomationPolicyExecutionActionConstructorOptions.js.map +1 -0
- package/dist/es/models/{IExamplePolicyArbiterConstructorOptions.js → IDefaultPolicyArbiterConfig.js} +1 -1
- package/dist/es/models/IDefaultPolicyArbiterConfig.js.map +1 -0
- package/dist/es/models/{IExamplePolicyRequesterConstructorOptions.js → IDefaultPolicyArbiterConstructorOptions.js} +1 -1
- package/dist/es/models/IDefaultPolicyArbiterConstructorOptions.js.map +1 -0
- package/dist/es/models/{IExamplePolicyEnforcementProcessorConstructorOptions.js → IDefaultPolicyEnforcementProcessorConstructorOptions.js} +1 -1
- package/dist/es/models/IDefaultPolicyEnforcementProcessorConstructorOptions.js.map +1 -0
- package/dist/es/models/IIdentityPolicyInformationSourceConstructorOptions.js.map +1 -1
- package/dist/es/models/IIdentityProfilePolicyInformationSourceConstructorOptions.js +4 -0
- package/dist/es/models/IIdentityProfilePolicyInformationSourceConstructorOptions.js.map +1 -0
- package/dist/es/models/ILoggingPolicyExecutionActionConfig.js.map +1 -1
- package/dist/es/models/ILoggingPolicyExecutionActionConstructorOptions.js.map +1 -1
- package/dist/es/models/{IExampleDataAccessHandlerConstructorOptions.js → IPassThroughPolicyArbiterConstructorOptions.js} +1 -1
- package/dist/es/models/IPassThroughPolicyArbiterConstructorOptions.js.map +1 -0
- package/dist/es/models/IPassThroughPolicyEnforcementProcessorConstructorOptions.js +4 -0
- package/dist/es/models/IPassThroughPolicyEnforcementProcessorConstructorOptions.js.map +1 -0
- package/dist/es/models/IPassThroughPolicyNegotiatorConstructorOptions.js +4 -0
- package/dist/es/models/IPassThroughPolicyNegotiatorConstructorOptions.js.map +1 -0
- package/dist/es/models/IPassThroughPolicyObligationEnforcerConstructorOptions.js +4 -0
- package/dist/es/models/IPassThroughPolicyObligationEnforcerConstructorOptions.js.map +1 -0
- package/dist/es/models/{IExamplePolicyNegotiatorConstructorOptions.js → IPassThroughPolicyRequesterConstructorOptions.js} +1 -1
- package/dist/es/models/IPassThroughPolicyRequesterConstructorOptions.js.map +1 -0
- package/dist/es/models/IStaticPolicyInformationSource.js.map +1 -1
- package/dist/es/models/IStaticPolicyInformationSourceConstructorOptions.js.map +1 -1
- package/dist/es/policyArbiters/defaultPolicyArbiter.js +1790 -0
- package/dist/es/policyArbiters/defaultPolicyArbiter.js.map +1 -0
- package/dist/es/policyArbiters/passThroughPolicyArbiter.js +59 -0
- package/dist/es/policyArbiters/passThroughPolicyArbiter.js.map +1 -0
- package/dist/es/policyEnforcementProcessor/defaultPolicyEnforcementProcessor.js +147 -0
- package/dist/es/policyEnforcementProcessor/defaultPolicyEnforcementProcessor.js.map +1 -0
- package/dist/es/policyEnforcementProcessor/passThroughPolicyEnforcementProcessor.js +54 -0
- package/dist/es/policyEnforcementProcessor/passThroughPolicyEnforcementProcessor.js.map +1 -0
- package/dist/es/policyExecutionActions/automationPolicyExecutionAction.js +77 -0
- package/dist/es/policyExecutionActions/automationPolicyExecutionAction.js.map +1 -0
- package/dist/es/policyExecutionActions/loggingPolicyExecutionAction.js +22 -18
- package/dist/es/policyExecutionActions/loggingPolicyExecutionAction.js.map +1 -1
- package/dist/es/policyInformationSources/identityPolicyInformationSource.js +44 -32
- package/dist/es/policyInformationSources/identityPolicyInformationSource.js.map +1 -1
- package/dist/es/policyInformationSources/identityProfilePolicyInformationSource.js +112 -0
- package/dist/es/policyInformationSources/identityProfilePolicyInformationSource.js.map +1 -0
- package/dist/es/policyInformationSources/staticPolicyInformationSource.js +18 -16
- package/dist/es/policyInformationSources/staticPolicyInformationSource.js.map +1 -1
- package/dist/es/policyNegotiators/passThroughPolicyNegotiator.js +88 -0
- package/dist/es/policyNegotiators/passThroughPolicyNegotiator.js.map +1 -0
- package/dist/es/policyObligationEnforcers/passThroughPolicyObligationEnforcer.js +56 -0
- package/dist/es/policyObligationEnforcers/passThroughPolicyObligationEnforcer.js.map +1 -0
- package/dist/es/policyRequesters/passThroughPolicyRequester.js +103 -0
- package/dist/es/policyRequesters/passThroughPolicyRequester.js.map +1 -0
- package/dist/types/index.d.ts +20 -10
- package/dist/types/models/IAutomationPolicyExecutionActionConfig.d.ts +9 -0
- package/dist/types/models/IAutomationPolicyExecutionActionConstructorOptions.d.ts +15 -0
- package/dist/types/models/IDefaultPolicyArbiterConfig.d.ts +10 -0
- package/dist/types/models/IDefaultPolicyArbiterConstructorOptions.d.ts +19 -0
- package/dist/types/models/IDefaultPolicyEnforcementProcessorConstructorOptions.d.ts +9 -0
- package/dist/types/models/IIdentityPolicyInformationSourceConstructorOptions.d.ts +0 -1
- package/dist/types/models/IIdentityProfilePolicyInformationSourceConstructorOptions.d.ts +14 -0
- package/dist/types/models/ILoggingPolicyExecutionActionConfig.d.ts +2 -2
- package/dist/types/models/ILoggingPolicyExecutionActionConstructorOptions.d.ts +0 -1
- package/dist/types/models/IPassThroughPolicyArbiterConstructorOptions.d.ts +9 -0
- package/dist/types/models/IPassThroughPolicyEnforcementProcessorConstructorOptions.d.ts +9 -0
- package/dist/types/models/IPassThroughPolicyNegotiatorConstructorOptions.d.ts +9 -0
- package/dist/types/models/IPassThroughPolicyObligationEnforcerConstructorOptions.d.ts +9 -0
- package/dist/types/models/IPassThroughPolicyRequesterConstructorOptions.d.ts +9 -0
- package/dist/types/models/IStaticPolicyInformationSource.d.ts +8 -5
- package/dist/types/models/IStaticPolicyInformationSourceConstructorOptions.d.ts +0 -1
- package/dist/types/policyArbiters/defaultPolicyArbiter.d.ts +38 -0
- package/dist/types/policyArbiters/passThroughPolicyArbiter.d.ts +32 -0
- package/dist/types/policyEnforcementProcessor/defaultPolicyEnforcementProcessor.d.ts +32 -0
- package/dist/types/policyEnforcementProcessor/passThroughPolicyEnforcementProcessor.d.ts +32 -0
- package/dist/types/policyExecutionActions/automationPolicyExecutionAction.d.ts +45 -0
- package/dist/types/policyExecutionActions/loggingPolicyExecutionAction.d.ts +6 -18
- package/dist/types/policyInformationSources/identityPolicyInformationSource.d.ts +5 -6
- package/dist/types/policyInformationSources/identityProfilePolicyInformationSource.d.ts +31 -0
- package/dist/types/policyInformationSources/staticPolicyInformationSource.d.ts +5 -6
- package/dist/types/policyNegotiators/passThroughPolicyNegotiator.d.ts +47 -0
- package/dist/types/policyObligationEnforcers/passThroughPolicyObligationEnforcer.d.ts +32 -0
- package/dist/types/policyRequesters/passThroughPolicyRequester.d.ts +48 -0
- package/docs/changelog.md +1230 -10
- package/docs/examples.md +295 -1
- package/docs/reference/classes/AutomationPolicyExecutionAction.md +143 -0
- package/docs/reference/classes/DefaultPolicyArbiter.md +113 -0
- package/docs/reference/classes/DefaultPolicyEnforcementProcessor.md +107 -0
- package/docs/reference/classes/IdentityPolicyInformationSource.md +14 -14
- package/docs/reference/classes/IdentityProfilePolicyInformationSource.md +103 -0
- package/docs/reference/classes/LoggingPolicyExecutionAction.md +20 -20
- package/docs/reference/classes/PassThroughPolicyArbiter.md +103 -0
- package/docs/reference/classes/PassThroughPolicyEnforcementProcessor.md +107 -0
- package/docs/reference/classes/{ExamplePolicyNegotiator.md → PassThroughPolicyNegotiator.md} +27 -21
- package/docs/reference/classes/PassThroughPolicyObligationEnforcer.md +109 -0
- package/docs/reference/classes/{ExamplePolicyRequester.md → PassThroughPolicyRequester.md} +22 -40
- package/docs/reference/classes/StaticPolicyInformationSource.md +15 -15
- package/docs/reference/index.md +20 -10
- package/docs/reference/interfaces/IAutomationPolicyExecutionActionConfig.md +11 -0
- package/docs/reference/interfaces/IAutomationPolicyExecutionActionConstructorOptions.md +25 -0
- package/docs/reference/interfaces/IDefaultPolicyArbiterConfig.md +17 -0
- package/docs/reference/interfaces/IDefaultPolicyArbiterConstructorOptions.md +33 -0
- package/docs/reference/interfaces/IDefaultPolicyEnforcementProcessorConstructorOptions.md +11 -0
- package/docs/reference/interfaces/IIdentityPolicyInformationSourceConstructorOptions.md +4 -10
- package/docs/reference/interfaces/IIdentityProfilePolicyInformationSourceConstructorOptions.md +25 -0
- package/docs/reference/interfaces/ILoggingPolicyExecutionActionConfig.md +9 -9
- package/docs/reference/interfaces/ILoggingPolicyExecutionActionConstructorOptions.md +4 -10
- package/docs/reference/interfaces/IPassThroughPolicyArbiterConstructorOptions.md +11 -0
- package/docs/reference/interfaces/IPassThroughPolicyEnforcementProcessorConstructorOptions.md +11 -0
- package/docs/reference/interfaces/IPassThroughPolicyNegotiatorConstructorOptions.md +11 -0
- package/docs/reference/interfaces/IPassThroughPolicyObligationEnforcerConstructorOptions.md +11 -0
- package/docs/reference/interfaces/IPassThroughPolicyRequesterConstructorOptions.md +11 -0
- package/docs/reference/interfaces/IStaticPolicyInformationSource.md +21 -6
- package/docs/reference/interfaces/IStaticPolicyInformationSourceConfig.md +2 -2
- package/docs/reference/interfaces/IStaticPolicyInformationSourceConstructorOptions.md +4 -10
- package/locales/en.json +65 -6
- package/package.json +14 -11
- package/dist/es/dataAccessHandlers/examplePolicyRequester.js +0 -82
- package/dist/es/dataAccessHandlers/examplePolicyRequester.js.map +0 -1
- package/dist/es/models/IExampleDataAccessHandlerConstructorOptions.js.map +0 -1
- package/dist/es/models/IExamplePolicyArbiterConstructorOptions.js.map +0 -1
- package/dist/es/models/IExamplePolicyEnforcementProcessorConstructorOptions.js.map +0 -1
- package/dist/es/models/IExamplePolicyNegotiatorConstructorOptions.js.map +0 -1
- package/dist/es/models/IExamplePolicyRequesterConstructorOptions.js.map +0 -1
- package/dist/es/policyArbiters/examplePolicyArbiter.js +0 -50
- package/dist/es/policyArbiters/examplePolicyArbiter.js.map +0 -1
- package/dist/es/policyEnforcementProcessor/examplePolicyEnforcementProcessor.js +0 -42
- package/dist/es/policyEnforcementProcessor/examplePolicyEnforcementProcessor.js.map +0 -1
- package/dist/es/policyNegotiators/examplePolicyNegotiator.js +0 -61
- package/dist/es/policyNegotiators/examplePolicyNegotiator.js.map +0 -1
- package/dist/es/policyRequesters/examplePolicyRequester.js +0 -69
- package/dist/es/policyRequesters/examplePolicyRequester.js.map +0 -1
- package/dist/types/dataAccessHandlers/examplePolicyRequester.d.ts +0 -68
- package/dist/types/models/IExampleDataAccessHandlerConstructorOptions.d.ts +0 -10
- package/dist/types/models/IExamplePolicyArbiterConstructorOptions.d.ts +0 -10
- package/dist/types/models/IExamplePolicyEnforcementProcessorConstructorOptions.d.ts +0 -10
- package/dist/types/models/IExamplePolicyNegotiatorConstructorOptions.d.ts +0 -10
- package/dist/types/models/IExamplePolicyRequesterConstructorOptions.d.ts +0 -10
- package/dist/types/policyArbiters/examplePolicyArbiter.d.ts +0 -36
- package/dist/types/policyEnforcementProcessor/examplePolicyEnforcementProcessor.d.ts +0 -29
- package/dist/types/policyNegotiators/examplePolicyNegotiator.d.ts +0 -45
- package/dist/types/policyRequesters/examplePolicyRequester.d.ts +0 -53
- package/docs/reference/classes/ExampleDataAccessHandler.md +0 -243
- package/docs/reference/classes/ExamplePolicyArbiter.md +0 -121
- package/docs/reference/classes/ExamplePolicyEnforcementProcessor.md +0 -101
- package/docs/reference/interfaces/IExampleDataAccessHandlerConstructorOptions.md +0 -17
- package/docs/reference/interfaces/IExamplePolicyArbiterConstructorOptions.md +0 -17
- package/docs/reference/interfaces/IExamplePolicyEnforcementProcessorConstructorOptions.md +0 -17
- package/docs/reference/interfaces/IExamplePolicyNegotiatorConstructorOptions.md +0 -17
- package/docs/reference/interfaces/IExamplePolicyRequesterConstructorOptions.md +0 -17
|
@@ -28,7 +28,7 @@ The options for the logging policy source.
|
|
|
28
28
|
|
|
29
29
|
## Properties
|
|
30
30
|
|
|
31
|
-
### CLASS\_NAME
|
|
31
|
+
### CLASS\_NAME {#class_name}
|
|
32
32
|
|
|
33
33
|
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
34
34
|
|
|
@@ -36,7 +36,7 @@ The class name of the Identity Policy Information Source.
|
|
|
36
36
|
|
|
37
37
|
## Methods
|
|
38
38
|
|
|
39
|
-
### className()
|
|
39
|
+
### className() {#classname}
|
|
40
40
|
|
|
41
41
|
> **className**(): `string`
|
|
42
42
|
|
|
@@ -54,9 +54,9 @@ The class name of the component.
|
|
|
54
54
|
|
|
55
55
|
***
|
|
56
56
|
|
|
57
|
-
### retrieve()
|
|
57
|
+
### retrieve() {#retrieve}
|
|
58
58
|
|
|
59
|
-
> **retrieve**\<`D`\>(`
|
|
59
|
+
> **retrieve**\<`D`\>(`policy`, `accessMode`, `data?`, `action?`): `Promise`\<`IRightsManagementInformation` \| `undefined`\>
|
|
60
60
|
|
|
61
61
|
Retrieve information from the sources.
|
|
62
62
|
|
|
@@ -68,11 +68,11 @@ Retrieve information from the sources.
|
|
|
68
68
|
|
|
69
69
|
#### Parameters
|
|
70
70
|
|
|
71
|
-
#####
|
|
71
|
+
##### policy
|
|
72
72
|
|
|
73
|
-
`
|
|
73
|
+
`IRightsManagementPolicy` \| `undefined`
|
|
74
74
|
|
|
75
|
-
The
|
|
75
|
+
The policy to retrieve information for if available.
|
|
76
76
|
|
|
77
77
|
##### accessMode
|
|
78
78
|
|
|
@@ -80,21 +80,21 @@ The locator to find relevant policies.
|
|
|
80
80
|
|
|
81
81
|
The access mode to use for the retrieval.
|
|
82
82
|
|
|
83
|
-
##### policies
|
|
84
|
-
|
|
85
|
-
`IOdrlPolicy`[]
|
|
86
|
-
|
|
87
|
-
The policies that apply to the data.
|
|
88
|
-
|
|
89
83
|
##### data?
|
|
90
84
|
|
|
91
85
|
`D`
|
|
92
86
|
|
|
93
87
|
The data to process.
|
|
94
88
|
|
|
89
|
+
##### action?
|
|
90
|
+
|
|
91
|
+
`string`
|
|
92
|
+
|
|
93
|
+
The action that was evaluated.
|
|
94
|
+
|
|
95
95
|
#### Returns
|
|
96
96
|
|
|
97
|
-
`Promise`\<`
|
|
97
|
+
`Promise`\<`IRightsManagementInformation` \| `undefined`\>
|
|
98
98
|
|
|
99
99
|
The objects containing relevant information or undefined if nothing relevant is found.
|
|
100
100
|
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Class: IdentityProfilePolicyInformationSource
|
|
2
|
+
|
|
3
|
+
Policy information source which retrieves identity profile information.
|
|
4
|
+
|
|
5
|
+
## Implements
|
|
6
|
+
|
|
7
|
+
- `IPolicyInformationSource`
|
|
8
|
+
|
|
9
|
+
## Constructors
|
|
10
|
+
|
|
11
|
+
### Constructor
|
|
12
|
+
|
|
13
|
+
> **new IdentityProfilePolicyInformationSource**(`options?`): `IdentityProfilePolicyInformationSource`
|
|
14
|
+
|
|
15
|
+
Create a new instance of IdentityProfilePolicyInformationSource.
|
|
16
|
+
|
|
17
|
+
#### Parameters
|
|
18
|
+
|
|
19
|
+
##### options?
|
|
20
|
+
|
|
21
|
+
[`IIdentityProfilePolicyInformationSourceConstructorOptions`](../interfaces/IIdentityProfilePolicyInformationSourceConstructorOptions.md)
|
|
22
|
+
|
|
23
|
+
The options for the identity profile policy source.
|
|
24
|
+
|
|
25
|
+
#### Returns
|
|
26
|
+
|
|
27
|
+
`IdentityProfilePolicyInformationSource`
|
|
28
|
+
|
|
29
|
+
## Properties
|
|
30
|
+
|
|
31
|
+
### CLASS\_NAME {#class_name}
|
|
32
|
+
|
|
33
|
+
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
34
|
+
|
|
35
|
+
The class name of the Identity Profile Policy Information Source.
|
|
36
|
+
|
|
37
|
+
## Methods
|
|
38
|
+
|
|
39
|
+
### className() {#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() {#retrieve}
|
|
58
|
+
|
|
59
|
+
> **retrieve**\<`D`\>(`policy`, `accessMode`, `data?`, `action?`): `Promise`\<`IRightsManagementInformation` \| `undefined`\>
|
|
60
|
+
|
|
61
|
+
Retrieve information from the sources.
|
|
62
|
+
|
|
63
|
+
#### Type Parameters
|
|
64
|
+
|
|
65
|
+
##### D
|
|
66
|
+
|
|
67
|
+
`D` = `unknown`
|
|
68
|
+
|
|
69
|
+
#### Parameters
|
|
70
|
+
|
|
71
|
+
##### policy
|
|
72
|
+
|
|
73
|
+
`IRightsManagementPolicy` \| `undefined`
|
|
74
|
+
|
|
75
|
+
The policy to retrieve information for if available.
|
|
76
|
+
|
|
77
|
+
##### accessMode
|
|
78
|
+
|
|
79
|
+
`PolicyInformationAccessMode`
|
|
80
|
+
|
|
81
|
+
The access mode to use for the retrieval.
|
|
82
|
+
|
|
83
|
+
##### data?
|
|
84
|
+
|
|
85
|
+
`D`
|
|
86
|
+
|
|
87
|
+
The data to process.
|
|
88
|
+
|
|
89
|
+
##### action?
|
|
90
|
+
|
|
91
|
+
`string`
|
|
92
|
+
|
|
93
|
+
The action that was evaluated.
|
|
94
|
+
|
|
95
|
+
#### Returns
|
|
96
|
+
|
|
97
|
+
`Promise`\<`IRightsManagementInformation` \| `undefined`\>
|
|
98
|
+
|
|
99
|
+
The objects containing relevant information or undefined if nothing relevant is found.
|
|
100
|
+
|
|
101
|
+
#### Implementation of
|
|
102
|
+
|
|
103
|
+
`IPolicyInformationSource.retrieve`
|
|
@@ -28,7 +28,7 @@ The options for the logging policy execution action.
|
|
|
28
28
|
|
|
29
29
|
## Properties
|
|
30
30
|
|
|
31
|
-
### CLASS\_NAME
|
|
31
|
+
### CLASS\_NAME {#class_name}
|
|
32
32
|
|
|
33
33
|
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
34
34
|
|
|
@@ -36,7 +36,7 @@ The class name of the Logging Policy Execution Action.
|
|
|
36
36
|
|
|
37
37
|
## Methods
|
|
38
38
|
|
|
39
|
-
### className()
|
|
39
|
+
### className() {#classname}
|
|
40
40
|
|
|
41
41
|
> **className**(): `string`
|
|
42
42
|
|
|
@@ -54,7 +54,7 @@ The class name of the component.
|
|
|
54
54
|
|
|
55
55
|
***
|
|
56
56
|
|
|
57
|
-
### supportedStages()
|
|
57
|
+
### supportedStages() {#supportedstages}
|
|
58
58
|
|
|
59
59
|
> **supportedStages**(): `PolicyDecisionStage`[]
|
|
60
60
|
|
|
@@ -72,9 +72,9 @@ List of stages.
|
|
|
72
72
|
|
|
73
73
|
***
|
|
74
74
|
|
|
75
|
-
### execute()
|
|
75
|
+
### execute() {#execute}
|
|
76
76
|
|
|
77
|
-
> **execute**\<`D`\>(`
|
|
77
|
+
> **execute**\<`D`\>(`policy`, `decisions`, `data`, `action`, `stage`): `Promise`\<`void`\>
|
|
78
78
|
|
|
79
79
|
Execute function type for policy actions.
|
|
80
80
|
|
|
@@ -86,35 +86,35 @@ Execute function type for policy actions.
|
|
|
86
86
|
|
|
87
87
|
#### Parameters
|
|
88
88
|
|
|
89
|
-
#####
|
|
89
|
+
##### policy
|
|
90
90
|
|
|
91
|
-
`
|
|
91
|
+
`IRightsManagementPolicy`
|
|
92
92
|
|
|
93
|
-
The
|
|
93
|
+
The policy that applied to the data.
|
|
94
94
|
|
|
95
|
-
#####
|
|
95
|
+
##### decisions
|
|
96
96
|
|
|
97
|
-
`
|
|
97
|
+
`IPolicyDecision`[]
|
|
98
98
|
|
|
99
|
-
The
|
|
99
|
+
The decisions made by the PDP.
|
|
100
100
|
|
|
101
|
-
#####
|
|
101
|
+
##### data
|
|
102
102
|
|
|
103
|
-
`
|
|
103
|
+
`D` \| `undefined`
|
|
104
104
|
|
|
105
|
-
The
|
|
105
|
+
The data to process.
|
|
106
106
|
|
|
107
|
-
#####
|
|
107
|
+
##### action
|
|
108
108
|
|
|
109
|
-
`
|
|
109
|
+
`string` \| `undefined`
|
|
110
110
|
|
|
111
|
-
|
|
111
|
+
Optional action to make a decision on, if not provided, the arbiter will evaluate all actions in the agreement.
|
|
112
112
|
|
|
113
|
-
#####
|
|
113
|
+
##### stage
|
|
114
114
|
|
|
115
|
-
`
|
|
115
|
+
`PolicyDecisionStage`
|
|
116
116
|
|
|
117
|
-
The
|
|
117
|
+
The stage of the policy decision.
|
|
118
118
|
|
|
119
119
|
#### Returns
|
|
120
120
|
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Class: PassThroughPolicyArbiter
|
|
2
|
+
|
|
3
|
+
Pass Through Policy Arbiter.
|
|
4
|
+
|
|
5
|
+
## Implements
|
|
6
|
+
|
|
7
|
+
- `IPolicyArbiter`
|
|
8
|
+
|
|
9
|
+
## Constructors
|
|
10
|
+
|
|
11
|
+
### Constructor
|
|
12
|
+
|
|
13
|
+
> **new PassThroughPolicyArbiter**(`options?`): `PassThroughPolicyArbiter`
|
|
14
|
+
|
|
15
|
+
Create a new instance of PassThroughPolicyArbiter.
|
|
16
|
+
|
|
17
|
+
#### Parameters
|
|
18
|
+
|
|
19
|
+
##### options?
|
|
20
|
+
|
|
21
|
+
[`IPassThroughPolicyArbiterConstructorOptions`](../interfaces/IPassThroughPolicyArbiterConstructorOptions.md)
|
|
22
|
+
|
|
23
|
+
The options for the pass through policy arbiter.
|
|
24
|
+
|
|
25
|
+
#### Returns
|
|
26
|
+
|
|
27
|
+
`PassThroughPolicyArbiter`
|
|
28
|
+
|
|
29
|
+
## Properties
|
|
30
|
+
|
|
31
|
+
### CLASS\_NAME {#class_name}
|
|
32
|
+
|
|
33
|
+
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
34
|
+
|
|
35
|
+
The class name of the Pass Through Policy Arbiter.
|
|
36
|
+
|
|
37
|
+
## Methods
|
|
38
|
+
|
|
39
|
+
### className() {#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
|
+
`IPolicyArbiter.className`
|
|
54
|
+
|
|
55
|
+
***
|
|
56
|
+
|
|
57
|
+
### decide() {#decide}
|
|
58
|
+
|
|
59
|
+
> **decide**\<`D`\>(`agreement`, `information?`, `data?`, `action?`): `Promise`\<`IPolicyDecision`[]\>
|
|
60
|
+
|
|
61
|
+
Makes decisions regarding policy access to data.
|
|
62
|
+
|
|
63
|
+
#### Type Parameters
|
|
64
|
+
|
|
65
|
+
##### D
|
|
66
|
+
|
|
67
|
+
`D` = `unknown`
|
|
68
|
+
|
|
69
|
+
#### Parameters
|
|
70
|
+
|
|
71
|
+
##### agreement
|
|
72
|
+
|
|
73
|
+
`IDataspaceProtocolAgreement`
|
|
74
|
+
|
|
75
|
+
The agreement to evaluate.
|
|
76
|
+
|
|
77
|
+
##### information?
|
|
78
|
+
|
|
79
|
+
`IRightsManagementInformation`
|
|
80
|
+
|
|
81
|
+
Information provided by the requester to determine if a policy can be created.
|
|
82
|
+
|
|
83
|
+
##### data?
|
|
84
|
+
|
|
85
|
+
`D`
|
|
86
|
+
|
|
87
|
+
The data to make a decision on.
|
|
88
|
+
|
|
89
|
+
##### action?
|
|
90
|
+
|
|
91
|
+
`string`
|
|
92
|
+
|
|
93
|
+
Optional action to make a decision on, if not provided, the arbiter will evaluate all actions in the agreement.
|
|
94
|
+
|
|
95
|
+
#### Returns
|
|
96
|
+
|
|
97
|
+
`Promise`\<`IPolicyDecision`[]\>
|
|
98
|
+
|
|
99
|
+
The decisions about access to the data.
|
|
100
|
+
|
|
101
|
+
#### Implementation of
|
|
102
|
+
|
|
103
|
+
`IPolicyArbiter.decide`
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Class: PassThroughPolicyEnforcementProcessor
|
|
2
|
+
|
|
3
|
+
Pass Through Policy Enforcement Processor.
|
|
4
|
+
|
|
5
|
+
## Implements
|
|
6
|
+
|
|
7
|
+
- `IPolicyEnforcementProcessor`
|
|
8
|
+
|
|
9
|
+
## Constructors
|
|
10
|
+
|
|
11
|
+
### Constructor
|
|
12
|
+
|
|
13
|
+
> **new PassThroughPolicyEnforcementProcessor**(`options?`): `PassThroughPolicyEnforcementProcessor`
|
|
14
|
+
|
|
15
|
+
Create a new instance of PassThroughPolicyEnforcementProcessor.
|
|
16
|
+
|
|
17
|
+
#### Parameters
|
|
18
|
+
|
|
19
|
+
##### options?
|
|
20
|
+
|
|
21
|
+
[`IPassThroughPolicyEnforcementProcessorConstructorOptions`](../interfaces/IPassThroughPolicyEnforcementProcessorConstructorOptions.md)
|
|
22
|
+
|
|
23
|
+
The options for the pass through policy enforcement processor.
|
|
24
|
+
|
|
25
|
+
#### Returns
|
|
26
|
+
|
|
27
|
+
`PassThroughPolicyEnforcementProcessor`
|
|
28
|
+
|
|
29
|
+
## Properties
|
|
30
|
+
|
|
31
|
+
### CLASS\_NAME {#class_name}
|
|
32
|
+
|
|
33
|
+
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
34
|
+
|
|
35
|
+
The class name of the Pass Through Policy Enforcement Processor.
|
|
36
|
+
|
|
37
|
+
## Methods
|
|
38
|
+
|
|
39
|
+
### className() {#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
|
+
`IPolicyEnforcementProcessor.className`
|
|
54
|
+
|
|
55
|
+
***
|
|
56
|
+
|
|
57
|
+
### process() {#process}
|
|
58
|
+
|
|
59
|
+
> **process**\<`D`, `R`\>(`agreement`, `decisions`, `data?`, `action?`): `Promise`\<`R`\>
|
|
60
|
+
|
|
61
|
+
Process the response from the policy decision point.
|
|
62
|
+
|
|
63
|
+
#### Type Parameters
|
|
64
|
+
|
|
65
|
+
##### D
|
|
66
|
+
|
|
67
|
+
`D` = `unknown`
|
|
68
|
+
|
|
69
|
+
##### R
|
|
70
|
+
|
|
71
|
+
`R` = `D`
|
|
72
|
+
|
|
73
|
+
#### Parameters
|
|
74
|
+
|
|
75
|
+
##### agreement
|
|
76
|
+
|
|
77
|
+
`IDataspaceProtocolAgreement`
|
|
78
|
+
|
|
79
|
+
The agreement to process.
|
|
80
|
+
|
|
81
|
+
##### decisions
|
|
82
|
+
|
|
83
|
+
`IPolicyDecision`[]
|
|
84
|
+
|
|
85
|
+
The decisions made by the policy decision point.
|
|
86
|
+
|
|
87
|
+
##### data?
|
|
88
|
+
|
|
89
|
+
`D`
|
|
90
|
+
|
|
91
|
+
The data to process.
|
|
92
|
+
|
|
93
|
+
##### action?
|
|
94
|
+
|
|
95
|
+
`string`
|
|
96
|
+
|
|
97
|
+
Optional action to make a decision on, if not provided, the arbiter will evaluate all actions in the agreement.
|
|
98
|
+
|
|
99
|
+
#### Returns
|
|
100
|
+
|
|
101
|
+
`Promise`\<`R`\>
|
|
102
|
+
|
|
103
|
+
The data after processing.
|
|
104
|
+
|
|
105
|
+
#### Implementation of
|
|
106
|
+
|
|
107
|
+
`IPolicyEnforcementProcessor.process`
|
package/docs/reference/classes/{ExamplePolicyNegotiator.md → PassThroughPolicyNegotiator.md}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Class:
|
|
1
|
+
# Class: PassThroughPolicyNegotiator
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Pass Through Policy Negotiator.
|
|
4
4
|
|
|
5
5
|
## Implements
|
|
6
6
|
|
|
@@ -10,33 +10,33 @@ Example Policy Negotiator.
|
|
|
10
10
|
|
|
11
11
|
### Constructor
|
|
12
12
|
|
|
13
|
-
> **new
|
|
13
|
+
> **new PassThroughPolicyNegotiator**(`options?`): `PassThroughPolicyNegotiator`
|
|
14
14
|
|
|
15
|
-
Create a new instance of
|
|
15
|
+
Create a new instance of PassThroughPolicyNegotiator.
|
|
16
16
|
|
|
17
17
|
#### Parameters
|
|
18
18
|
|
|
19
19
|
##### options?
|
|
20
20
|
|
|
21
|
-
[`
|
|
21
|
+
[`IPassThroughPolicyNegotiatorConstructorOptions`](../interfaces/IPassThroughPolicyNegotiatorConstructorOptions.md)
|
|
22
22
|
|
|
23
|
-
The options for the
|
|
23
|
+
The options for the pass through policy negotiator.
|
|
24
24
|
|
|
25
25
|
#### Returns
|
|
26
26
|
|
|
27
|
-
`
|
|
27
|
+
`PassThroughPolicyNegotiator`
|
|
28
28
|
|
|
29
29
|
## Properties
|
|
30
30
|
|
|
31
|
-
### CLASS\_NAME
|
|
31
|
+
### CLASS\_NAME {#class_name}
|
|
32
32
|
|
|
33
33
|
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
34
34
|
|
|
35
|
-
The class name of the
|
|
35
|
+
The class name of the Pass Through Policy Negotiator.
|
|
36
36
|
|
|
37
37
|
## Methods
|
|
38
38
|
|
|
39
|
-
### className()
|
|
39
|
+
### className() {#classname}
|
|
40
40
|
|
|
41
41
|
> **className**(): `string`
|
|
42
42
|
|
|
@@ -54,7 +54,7 @@ The class name of the component.
|
|
|
54
54
|
|
|
55
55
|
***
|
|
56
56
|
|
|
57
|
-
### supportsOffer()
|
|
57
|
+
### supportsOffer() {#supportsoffer}
|
|
58
58
|
|
|
59
59
|
> **supportsOffer**(`offer`): `boolean`
|
|
60
60
|
|
|
@@ -64,7 +64,7 @@ Determines if the negotiator supports the given offer.
|
|
|
64
64
|
|
|
65
65
|
##### offer
|
|
66
66
|
|
|
67
|
-
`
|
|
67
|
+
`IDataspaceProtocolOffer`
|
|
68
68
|
|
|
69
69
|
The offer to check.
|
|
70
70
|
|
|
@@ -72,7 +72,7 @@ The offer to check.
|
|
|
72
72
|
|
|
73
73
|
`boolean`
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
True if the negotiator supports the given offer.
|
|
76
76
|
|
|
77
77
|
#### Implementation of
|
|
78
78
|
|
|
@@ -80,7 +80,7 @@ Sets the supports flag if it can be offered, and the interventionRequired flag i
|
|
|
80
80
|
|
|
81
81
|
***
|
|
82
82
|
|
|
83
|
-
### handleOffer()
|
|
83
|
+
### handleOffer() {#handleoffer}
|
|
84
84
|
|
|
85
85
|
> **handleOffer**(`offer`, `information?`): `Promise`\<\{ `accepted`: `boolean`; `interventionRequired`: `boolean`; \}\>
|
|
86
86
|
|
|
@@ -90,13 +90,13 @@ Handle the offer.
|
|
|
90
90
|
|
|
91
91
|
##### offer
|
|
92
92
|
|
|
93
|
-
`
|
|
93
|
+
`IDataspaceProtocolOffer`
|
|
94
94
|
|
|
95
95
|
The offer to check.
|
|
96
96
|
|
|
97
97
|
##### information?
|
|
98
98
|
|
|
99
|
-
`
|
|
99
|
+
`IRightsManagementInformation`
|
|
100
100
|
|
|
101
101
|
Information provided by the requester to determine if a policy can be created.
|
|
102
102
|
|
|
@@ -112,9 +112,9 @@ Sets the accepted flag if it can be offered, and the interventionRequired flag i
|
|
|
112
112
|
|
|
113
113
|
***
|
|
114
114
|
|
|
115
|
-
### createAgreement()
|
|
115
|
+
### createAgreement() {#createagreement}
|
|
116
116
|
|
|
117
|
-
> **createAgreement**(`offer`, `information?`): `Promise`\<`
|
|
117
|
+
> **createAgreement**(`offer`, `assignee`, `information?`): `Promise`\<`IDataspaceProtocolAgreement` \| `undefined`\>
|
|
118
118
|
|
|
119
119
|
Create an agreement based on the offer.
|
|
120
120
|
|
|
@@ -122,19 +122,25 @@ Create an agreement based on the offer.
|
|
|
122
122
|
|
|
123
123
|
##### offer
|
|
124
124
|
|
|
125
|
-
`
|
|
125
|
+
`IDataspaceProtocolOffer`
|
|
126
126
|
|
|
127
127
|
The offer to create the agreement from.
|
|
128
128
|
|
|
129
|
+
##### assignee
|
|
130
|
+
|
|
131
|
+
`string` \| `IOdrlParty`
|
|
132
|
+
|
|
133
|
+
The assignee of the agreement.
|
|
134
|
+
|
|
129
135
|
##### information?
|
|
130
136
|
|
|
131
|
-
`
|
|
137
|
+
`IRightsManagementInformation`
|
|
132
138
|
|
|
133
139
|
Information provided by the requester to aid in the creation of the agreement.
|
|
134
140
|
|
|
135
141
|
#### Returns
|
|
136
142
|
|
|
137
|
-
`Promise`\<`
|
|
143
|
+
`Promise`\<`IDataspaceProtocolAgreement` \| `undefined`\>
|
|
138
144
|
|
|
139
145
|
The agreement created from the offer or undefined if an agreement could not be created.
|
|
140
146
|
|