Skip to content

Commit

Permalink
Revert "feat: derived resources (#36)"
Browse files Browse the repository at this point in the history
This reverts commit 1839a7c.
  • Loading branch information
termontwouter authored Mar 25, 2024
1 parent 1839a7c commit e2f48be
Show file tree
Hide file tree
Showing 22 changed files with 56 additions and 709 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,10 @@
"start:all": "yarn workspaces foreach --exclude . -A -pi run start",
"script:public": "yarn exec ts-node ./scripts/test-public.ts",
"script:private": "yarn exec ts-node ./scripts/test-private.ts",
"script:derived": "yarn exec ts-node ./scripts/test-derived.ts",
"script:registration": "yarn exec ts-node ./scripts/test-registration.ts",
"script:ucp-enforcement": "yarn exec ts-node ./scripts/test-ucp-enforcement.ts",
"script:uma-ucp": "yarn exec ts-node ./scripts/test-uma-ucp.ts",
"script:flow": "yarn run script:public && yarn run script:private && yarn run script:derived && yarn run script:uma-ucp && yarn run script:registration && yarn run script:ucp-enforcement"
"script:flow": "yarn run script:public && yarn run script:private && yarn run script:uma-ucp && yarn run script:registration && yarn run script:ucp-enforcement"
},
"devDependencies": {
"@commitlint/cli": "^16.1.0",
Expand Down
22 changes: 0 additions & 22 deletions packages/css/config/demo.json

This file was deleted.

72 changes: 0 additions & 72 deletions packages/css/config/derived.json

This file was deleted.

34 changes: 2 additions & 32 deletions packages/css/config/seed.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,44 +5,14 @@
"authz": {
"server": "http://localhost:4000/uma"
},
"pods": [{
"name": "alice",
"settings": {
"name": "Alice",
"umaServer": "http://localhost:4000/uma"
}
}]
"pods": [ { "name": "alice" } ]
},
{
"email": "[email protected]",
"password": "abc123",
"authz": {
"server": "http://localhost:4000/uma"
},
"pods": [
{
"name": "bob",
"settings": {
"name": "Bob",
"umaServer": "http://localhost:4000/uma"
}
}
]
},
{
"email": "[email protected]",
"password": "abc123",
"authz": {
"server": "http://localhost:4000/uma"
},
"pods": [
{
"name": "demo",
"settings": {
"name": "Demo",
"umaServer": "http://localhost:4000/uma"
}
}
]
"pods": [ { "name": "bob" } ]
}
]
3 changes: 1 addition & 2 deletions packages/css/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,10 @@
"build:ts": "yarn run -T tsc",
"build:components": "yarn run -T componentsjs-generator -r uma-css -s src/ -c dist/components -i .componentsignore --lenient",
"test": "yarn run -T jest --coverage",
"start": "yarn run community-solid-server -m . -c ./config/default.json ./config/derived.json ./config/demo.json --seedConfig ./config/seed.json"
"start": "yarn run community-solid-server -m . -c ./config/default.json --seedConfig ./config/seed.json"
},
"dependencies": {
"@solid/community-server": "^7.0.2",
"@solidlab/derived-resources-component": "^1.0.1",
"@solidlab/uma": "workspace:^",
"componentsjs": "^5.4.2",
"cross-fetch": "^4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/css/src/uma/ResourceRegistrar.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { UmaClient } from '../uma/UmaClient';
import type { ResourceIdentifier, MonitoringStore } from '@solid/community-server';
import { AS, getLoggerFor, StaticHandler } from '@solid/community-server';
import { OwnerUtil } from '../util/OwnerUtil';
import type { UmaClient } from '../uma/UmaClient';

export class ResourceRegistrar extends StaticHandler {
protected readonly logger = getLoggerFor(this);
Expand Down
17 changes: 8 additions & 9 deletions packages/css/src/uma/UmaClient.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import crypto from 'node:crypto';
import {
type KeyValueStorage, type ResourceIdentifier,
AccessMap, getLoggerFor, InternalServerError, JwkGenerator,
} from "@solid/community-server";
import type { Fetcher } from "../util/fetch/Fetcher";
import type { ResourceDescription } from '@solidlab/uma';
import { httpbis, type SigningKey, type Request as SignRequest } from 'http-message-signatures';
import type { KeyValueStorage, Representation, ResourceIdentifier } from "@solid/community-server";
import { AccessMap, getLoggerFor, InternalServerError, JwkGenerator, NotFoundHttpError } from "@solid/community-server";
import { JWTPayload, decodeJwt, createRemoteJWKSet, jwtVerify, JWTVerifyOptions } from "jose";
import { httpbis, type SigningKey, type Request as SignRequest } from 'http-message-signatures';
import fetch from 'cross-fetch';
import type { Fetcher } from "../util/fetch/Fetcher";
import crypto from 'node:crypto';
import type { ResourceDescription } from "@solidlab/uma";

export interface Claims {
[key: string]: unknown;
Expand Down Expand Up @@ -72,9 +71,9 @@ export class UmaClient {
*/
constructor(
protected baseUrl: string,
protected umaIdStore: KeyValueStorage<string, string>,
protected fetcher: Fetcher,
protected keyGen: JwkGenerator,
protected umaIdStore: KeyValueStorage<string, string>,
protected options: UmaVerificationOptions = {},
) {}

Expand Down
3 changes: 0 additions & 3 deletions packages/css/templates/pod/base/.meta

This file was deleted.

27 changes: 0 additions & 27 deletions packages/css/templates/pod/base/README$.md.hbs

This file was deleted.

22 changes: 0 additions & 22 deletions packages/css/templates/pod/base/private/.meta

This file was deleted.

20 changes: 0 additions & 20 deletions packages/css/templates/pod/base/private/data$.ttl

This file was deleted.

13 changes: 0 additions & 13 deletions packages/css/templates/pod/base/profile/card$.ttl.hbs

This file was deleted.

25 changes: 0 additions & 25 deletions packages/css/templates/pod/base/public/.meta

This file was deleted.

23 changes: 0 additions & 23 deletions packages/css/templates/pod/base/public/data$.ttl

This file was deleted.

18 changes: 0 additions & 18 deletions packages/css/templates/pod/base/public/filters/age$.sparql

This file was deleted.

7 changes: 0 additions & 7 deletions packages/css/templates/pod/base/public/filters/bday$.sparql

This file was deleted.

4 changes: 1 addition & 3 deletions packages/uma/src/dialog/BaseNegotiator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,7 @@ export class BaseNegotiator implements Negotiator {
return stored;
}

if (!permissions) {
this.error(BadRequestHttpError, 'A token request without existing ticket should include requested permissions.');
}
if (!permissions) this.error(BadRequestHttpError, 'The provided ticket is not valid.');

return await this.ticketingStrategy.initializeTicket(permissions);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/uma/src/dialog/Input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Permission } from "../views/Permission";
* A ReType constant for {@link DialogInput:type}.
*/
export const DialogInput = ({
ticket: $(string),
ticket: string,
claim_token: $(string),
claim_token_format: $(string), // TODO: switch to array of claims objects with unknown structure
pct: $(string),
Expand Down
Loading

0 comments on commit e2f48be

Please sign in to comment.