Skip to content

Commit 9f3fb8a

Browse files
committed
refactor: Move UMA-specific components to separate configs
1 parent 06c3d52 commit 9f3fb8a

7 files changed

Lines changed: 196 additions & 136 deletions

File tree

Lines changed: 9 additions & 136 deletions
Original file line numberDiff line numberDiff line change
@@ -1,141 +1,14 @@
11
{
22
"@context": [
3-
"https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^7.0.0/components/context.jsonld",
43
"https://linkedsoftwaredependencies.org/bundles/npm/@solidlab/uma-css/^0.0.0/components/context.jsonld"
54
],
6-
"@graph": [
7-
{
8-
"@id": "urn:solid-server:default:ServerConfigurator",
9-
"@type": "ParallelHandler",
10-
"handlers": [
11-
{
12-
"@id": "urn:solid-server:default:StatusDependantServerConfigurator",
13-
"@type": "StatusDependantServerConfigurator",
14-
"dependants": [
15-
{ "@id": "urn:solid-server:default:UmaFetcher" }
16-
],
17-
"statusMap": [
18-
{
19-
"StatusDependantServerConfigurator:_statusMap_key": "listening",
20-
"StatusDependantServerConfigurator:_statusMap_value": true
21-
},
22-
{
23-
"StatusDependantServerConfigurator:_statusMap_key": "close",
24-
"StatusDependantServerConfigurator:_statusMap_value": false
25-
},
26-
{
27-
"StatusDependantServerConfigurator:_statusMap_key": "error",
28-
"StatusDependantServerConfigurator:_statusMap_value": false
29-
}
30-
]
31-
}
32-
]
33-
},
34-
{
35-
"comment": "Returns the UMA ticket in case of an unauthorized request.",
36-
"@id": "urn:solid-server:default:UmaClient",
37-
"@type": "UmaClient",
38-
"umaIdStore": {
39-
"@id": "urn:solid-server:default:UmaIdStore",
40-
"@type": "MemoryMapStorage"
41-
},
42-
"fetcher": {
43-
"@id": "urn:solid-server:default:UmaFetcher",
44-
"@type": "PausableFetcher",
45-
"fetcher": {
46-
"@type": "RetryingFetcher",
47-
"fetcher": {
48-
"@type": "SignedFetcher",
49-
"fetcher": {
50-
"@type": "BaseFetcher"
51-
},
52-
"baseUrl": { "@id": "urn:solid-server:default:variable:baseUrl" },
53-
"keyGen": { "@id": "urn:solid-server:default:JwkGenerator" }
54-
},
55-
"retries": 150,
56-
"exponent": 3,
57-
"retryOn": [401, 500]
58-
}
59-
}
60-
},
61-
{
62-
"@id": "urn:solid-server:default:OwnerUtil",
63-
"@type": "OwnerUtil",
64-
"podStore": {
65-
"@id": "urn:solid-server:default:PodStore"
66-
},
67-
"accountStore": {
68-
"@id": "urn:solid-server:default:AccountStore"
69-
},
70-
"storageStrategy": {
71-
"@id": "urn:solid-server:default:StorageLocationStrategy"
72-
},
73-
"umaPatStore": {
74-
"@id": "urn:solid-server:default:UmaPatStore",
75-
"@type": "MemoryMapStorage"
76-
},
77-
"umaServerURL": {
78-
"@id": "urn:solid-server:uma:variable:AuthorizationServer"
79-
}
80-
},
81-
{
82-
"comment": "Listens to the activities emitted by the MonitoringStore.",
83-
"@id": "urn:solid-server:default:ResourceRegistrar",
84-
"@type": "ResourceRegistrar",
85-
"store": {
86-
"@id": "urn:solid-server:default:ResourceStore"
87-
},
88-
"ownerUtil": {
89-
"@id": "urn:solid-server:default:OwnerUtil"
90-
},
91-
"umaClient": {
92-
"@id": "urn:solid-server:default:UmaClient"
93-
}
94-
},
95-
{
96-
"comment": "The ResourceRegistrar is added to the list of Initializers so Components.js finds and instantiates it.",
97-
"@id": "urn:solid-server:default:PrimaryParallelInitializer",
98-
"@type": "ParallelHandler",
99-
"handlers": [
100-
{
101-
"@id": "urn:solid-server:default:ResourceRegistrar"
102-
}
103-
]
104-
},
105-
{
106-
"@id": "urn:solid-server-app-setup:default:CliExtractor",
107-
"@type": "YargsCliExtractor",
108-
"parameters": [
109-
{
110-
"@type": "YargsParameter",
111-
"name": "authServer",
112-
"options": {
113-
"alias": "a",
114-
"requiresArg": true,
115-
"type": "string",
116-
"describe": "The URL of the UMA Authorization Server."
117-
}
118-
}
119-
]
120-
}, {
121-
"comment": "Converts an input key/value object into an object mapping values to Components.js variables",
122-
"@id": "urn:solid-server-app-setup:default:ShorthandResolver",
123-
"@type": "CombinedShorthandResolver",
124-
"resolvers": [
125-
{
126-
"CombinedShorthandResolver:_resolvers_key": "urn:solid-server:uma:variable:AuthorizationServer",
127-
"CombinedShorthandResolver:_resolvers_value": {
128-
"@type": "KeyExtractor",
129-
"key": "authServer",
130-
"defaultValue": "http://localhost:4000"
131-
}
132-
}
133-
]
134-
},
135-
{
136-
"comment": "URL of the UMA Authorization Server.",
137-
"@id": "urn:solid-server:uma:variable:AuthorizationServer",
138-
"@type": "Variable"
139-
}
140-
]
5+
"import": [
6+
"uma-css:config/uma/parts/cli.json",
7+
"uma-css:config/uma/parts/client.json",
8+
"uma-css:config/uma/parts/fetcher.json",
9+
"uma-css:config/uma/parts/owner-util.json",
10+
"uma-css:config/uma/parts/resource-registrar.json",
11+
"uma-css:config/uma/parts/server-configurator.json"
12+
],
13+
"@graph": []
14114
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"@context": [
3+
"https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^7.0.0/components/context.jsonld",
4+
"https://linkedsoftwaredependencies.org/bundles/npm/@solidlab/uma-css/^0.0.0/components/context.jsonld"
5+
],
6+
"@graph": [
7+
{
8+
"@id": "urn:solid-server-app-setup:default:CliExtractor",
9+
"@type": "YargsCliExtractor",
10+
"parameters": [
11+
{
12+
"@type": "YargsParameter",
13+
"name": "authServer",
14+
"options": {
15+
"alias": "a",
16+
"requiresArg": true,
17+
"type": "string",
18+
"describe": "The URL of the UMA Authorization Server."
19+
}
20+
}
21+
]
22+
},
23+
{
24+
"comment": "Converts an input key/value object into an object mapping values to Components.js variables",
25+
"@id": "urn:solid-server-app-setup:default:ShorthandResolver",
26+
"@type": "CombinedShorthandResolver",
27+
"resolvers": [
28+
{
29+
"CombinedShorthandResolver:_resolvers_key": "urn:solid-server:uma:variable:AuthorizationServer",
30+
"CombinedShorthandResolver:_resolvers_value": {
31+
"@type": "KeyExtractor",
32+
"key": "authServer",
33+
"defaultValue": "http://localhost:4000"
34+
}
35+
}
36+
]
37+
},
38+
{
39+
"comment": "URL of the UMA Authorization Server.",
40+
"@id": "urn:solid-server:uma:variable:AuthorizationServer",
41+
"@type": "Variable"
42+
}
43+
]
44+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"@context": [
3+
"https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^7.0.0/components/context.jsonld",
4+
"https://linkedsoftwaredependencies.org/bundles/npm/@solidlab/uma-css/^0.0.0/components/context.jsonld"
5+
],
6+
"@graph": [
7+
{
8+
"comment": "Provides support for interactions with the UMA AS.",
9+
"@id": "urn:solid-server:default:UmaClient",
10+
"@type": "UmaClient",
11+
"umaIdStore": {
12+
"@id": "urn:solid-server:default:UmaIdStore",
13+
"@type": "MemoryMapStorage"
14+
},
15+
"fetcher": {
16+
"@id": "urn:solid-server:default:UmaFetcher"
17+
}
18+
}
19+
]
20+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"@context": [
3+
"https://linkedsoftwaredependencies.org/bundles/npm/@solidlab/uma-css/^0.0.0/components/context.jsonld"
4+
],
5+
"@graph": [
6+
{
7+
"comment": "Adds additional features when performing HTTP requests",
8+
"@id": "urn:solid-server:default:UmaFetcher",
9+
"@type": "PausableFetcher",
10+
"fetcher": {
11+
"@type": "RetryingFetcher",
12+
"fetcher": {
13+
"@type": "SignedFetcher",
14+
"fetcher": {
15+
"@type": "BaseFetcher"
16+
},
17+
"baseUrl": { "@id": "urn:solid-server:default:variable:baseUrl" },
18+
"keyGen": { "@id": "urn:solid-server:default:JwkGenerator" }
19+
},
20+
"retries": 150,
21+
"exponent": 3,
22+
"retryOn": [401, 500]
23+
}
24+
}
25+
]
26+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"@context": [
3+
"https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^7.0.0/components/context.jsonld",
4+
"https://linkedsoftwaredependencies.org/bundles/npm/@solidlab/uma-css/^0.0.0/components/context.jsonld"
5+
],
6+
"@graph": [
7+
{
8+
"comment": "Provides utility for interacting with pod owner metadata",
9+
"@id": "urn:solid-server:default:OwnerUtil",
10+
"@type": "OwnerUtil",
11+
"podStore": {
12+
"@id": "urn:solid-server:default:PodStore"
13+
},
14+
"accountStore": {
15+
"@id": "urn:solid-server:default:AccountStore"
16+
},
17+
"storageStrategy": {
18+
"@id": "urn:solid-server:default:StorageLocationStrategy"
19+
},
20+
"umaPatStore": {
21+
"@id": "urn:solid-server:default:UmaPatStore",
22+
"@type": "MemoryMapStorage"
23+
},
24+
"umaServerURL": {
25+
"@id": "urn:solid-server:uma:variable:AuthorizationServer"
26+
}
27+
}
28+
]
29+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"@context": [
3+
"https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^7.0.0/components/context.jsonld",
4+
"https://linkedsoftwaredependencies.org/bundles/npm/@solidlab/uma-css/^0.0.0/components/context.jsonld"
5+
],
6+
"@graph": [
7+
{
8+
"comment": "Listens to the activities emitted by the MonitoringStore.",
9+
"@id": "urn:solid-server:default:ResourceRegistrar",
10+
"@type": "ResourceRegistrar",
11+
"store": {
12+
"@id": "urn:solid-server:default:ResourceStore"
13+
},
14+
"ownerUtil": {
15+
"@id": "urn:solid-server:default:OwnerUtil"
16+
},
17+
"umaClient": {
18+
"@id": "urn:solid-server:default:UmaClient"
19+
}
20+
},
21+
{
22+
"comment": "The ResourceRegistrar is added to the list of Initializers so Components.js finds and instantiates it.",
23+
"@id": "urn:solid-server:default:PrimaryParallelInitializer",
24+
"@type": "ParallelHandler",
25+
"handlers": [
26+
{
27+
"@id": "urn:solid-server:default:ResourceRegistrar"
28+
}
29+
]
30+
}
31+
]
32+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"@context": [
3+
"https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^7.0.0/components/context.jsonld",
4+
"https://linkedsoftwaredependencies.org/bundles/npm/@solidlab/uma-css/^0.0.0/components/context.jsonld"
5+
],
6+
"@graph": [
7+
{
8+
"@id": "urn:solid-server:default:ServerConfigurator",
9+
"@type": "ParallelHandler",
10+
"handlers": [
11+
{
12+
"comment": "Informs relevant components of changes to the server state",
13+
"@id": "urn:solid-server:default:StatusDependantServerConfigurator",
14+
"@type": "StatusDependantServerConfigurator",
15+
"dependants": [
16+
{ "@id": "urn:solid-server:default:UmaFetcher" }
17+
],
18+
"statusMap": [
19+
{
20+
"StatusDependantServerConfigurator:_statusMap_key": "listening",
21+
"StatusDependantServerConfigurator:_statusMap_value": true
22+
},
23+
{
24+
"StatusDependantServerConfigurator:_statusMap_key": "close",
25+
"StatusDependantServerConfigurator:_statusMap_value": false
26+
},
27+
{
28+
"StatusDependantServerConfigurator:_statusMap_key": "error",
29+
"StatusDependantServerConfigurator:_statusMap_value": false
30+
}
31+
]
32+
}
33+
]
34+
}
35+
]
36+
}

0 commit comments

Comments
 (0)