Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
fix: update packages
Browse files Browse the repository at this point in the history
Signed-off-by: Mirko Mollik <mollik@trustcerts.de>
  • Loading branch information
Mirko Mollik committed Apr 28, 2024
1 parent b9907d6 commit f76bbe0
Show file tree
Hide file tree
Showing 14 changed files with 735 additions and 736 deletions.
58 changes: 29 additions & 29 deletions apps/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,51 +23,51 @@
},
"dependencies": {
"@nestjs/axios": "^3.0.2",
"@nestjs/common": "^10.0.0",
"@nestjs/config": "^3.2.0",
"@nestjs/core": "^10.0.0",
"@nestjs/platform-express": "^10.0.0",
"@nestjs/swagger": "^7.3.0",
"@nestjs/common": "^10.3.8",
"@nestjs/config": "^3.2.2",
"@nestjs/core": "^10.3.8",
"@nestjs/platform-express": "^10.3.8",
"@nestjs/swagger": "^7.3.1",
"@nestjs/typeorm": "^10.0.2",
"@sd-jwt/crypto-nodejs": "^0.6.1",
"@sd-jwt/sd-jwt-vc": "^0.6.1",
"@sphereon/did-auth-siop": "^0.6.3",
"@sphereon/oid4vci-client": "^0.10.2",
"@sphereon/oid4vci-common": "^0.10.1",
"@sphereon/pex": "^3.3.1",
"@sphereon/ssi-types": "^0.21.0",
"@sphereon/did-auth-siop": "^0.6.4",
"@sphereon/oid4vci-client": "^0.10.3",
"@sphereon/oid4vci-common": "^0.10.3",
"@sphereon/pex": "^3.3.3",
"@sphereon/ssi-types": "^0.23.4",
"axios": "^1.6.8",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.1",
"did-resolver": "^4.1.0",
"joi": "^17.12.2",
"jose": "^5.2.3",
"keycloak-connect": "^24.0.1",
"joi": "^17.13.0",
"jose": "^5.2.4",
"keycloak-connect": "^24.0.3",
"nest-keycloak-connect": "^1.10.0",
"pg": "^8.11.3",
"reflect-metadata": "^0.2.0",
"pg": "^8.11.5",
"reflect-metadata": "^0.2.2",
"rxjs": "^7.8.1",
"sqlite3": "^5.1.7",
"typeorm": "^0.3.20",
"uuid": "^9.0.1"
},
"devDependencies": {
"@nestjs/cli": "^10.0.0",
"@nestjs/schematics": "^10.0.0",
"@nestjs/testing": "^10.0.0",
"@types/express": "^4.17.17",
"@types/jest": "^29.5.2",
"@types/node": "^20.3.1",
"@types/supertest": "^6.0.0",
"jest": "^29.5.0",
"prettier": "^3.0.0",
"@nestjs/cli": "^10.3.2",
"@nestjs/schematics": "^10.1.1",
"@nestjs/testing": "^10.3.8",
"@types/express": "^4.17.21",
"@types/jest": "^29.5.12",
"@types/node": "^20.12.7",
"@types/supertest": "^6.0.2",
"jest": "^29.7.0",
"prettier": "^3.2.5",
"source-map-support": "^0.5.21",
"supertest": "^6.3.3",
"ts-jest": "^29.1.0",
"ts-loader": "^9.4.3",
"ts-node": "^10.9.1",
"supertest": "^6.3.4",
"ts-jest": "^29.1.2",
"ts-loader": "^9.5.1",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.1.3"
"typescript": "^5.4.5"
},
"jest": {
"moduleFileExtensions": [
Expand Down
2 changes: 1 addition & 1 deletion apps/backend/src/credentials/credentials.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class CredentialsController {
@AuthenticatedUser() user: KeycloakUser
): Promise<CredentialResponse> {
//TODO: return the parsed values so the client does not have to decode it.
return this.credentialsService.findOne(id, user.sub).catch(() => {
return this.credentialsService.showOne(id, user.sub).catch(() => {
throw new ConflictException();
});
}
Expand Down
28 changes: 15 additions & 13 deletions apps/backend/src/credentials/credentials.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,21 @@ export class CredentialsService {
return this.credentialRepository.find({ where: { user } });
}

findOne(id: string, user: string): Promise<CredentialResponse> {
return this.credentialRepository
.findOneOrFail({ where: { id, user } })
.then(async (entry) => {
const sdjwtvc = await this.instance.decode(entry.value);
const claims = await sdjwtvc.getClaims<Record<string, unknown>>(digest);
entry.value = undefined;
entry.user = undefined;
return {
...entry,
credential: claims,
};
});
findOne(id: string, user: string) {
return this.credentialRepository.findOneOrFail({ where: { id, user } });
}

showOne(id: string, user: string): Promise<CredentialResponse> {
return this.findOne(id, user).then(async (entry) => {
const sdjwtvc = await this.instance.decode(entry.value);
const claims = await sdjwtvc.getClaims<Record<string, unknown>>(digest);
entry.value = undefined;
entry.user = undefined;
return {
...entry,
credential: claims,
};
});
}

remove(id: string, user: string) {
Expand Down
7 changes: 6 additions & 1 deletion apps/backend/src/history/history.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ export class HistoryService {
) {}

all(user: string) {
return this.historyRepository.find({ where: { user } });
return this.historyRepository.find({
where: { user },
order: { created_at: 'DESC' },
// we only the id, relyingParty, created_at, and status fields to represent it as a list
select: ['id', 'relyingParty', 'created_at', 'status'],
});
}

getOne(id: string, user: string) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<div class="content">
<router-outlet></router-outlet>
</div>
<mat-toolbar
fxLayout="row"
fxLayoutAlign="space-between center"
*ngIf="authService.isAuthenticated()"
>
<mat-toolbar fxLayout="row" fxLayoutAlign="space-between center">
<div fxLayout="column" fxLayoutAlign=" center">
<a mat-icon-button routerLink="/scan" routerLinkActive="active-link"
><mat-icon>qr_code_scanner</mat-icon></a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
padding: 10px 40px;
height: 84px;
position: fixed;
bottom: 0px;
}

.content {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ export class ScannerComponent implements OnInit {
const response = await firstValueFrom(
this.httpClient.post<{ uri: string }>(
`${environment.demoVerifier}/request`,
{}
{
id: 'eID',
}
)
);
this.urlField.patchValue(response.uri);
Expand All @@ -77,7 +79,9 @@ export class ScannerComponent implements OnInit {
const response = await firstValueFrom(
this.httpClient.post<{ uri: string }>(
`${environment.demoIssuer}/request`,
{}
{
credentialId: 'Identity',
}
)
);
this.urlField.patchValue(response.uri);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export const environment = {
backendUrl: 'http://localhost:3000',
keycloakHost: 'https://keycloak.yanacocha.fit.fraunhofer.de',
keycloakHost: 'http://localhost:8080',
keycloakClient: 'browser',
keycloakRealm: 'wallet-ssi',
keycloakRealm: 'wallet',
demoIssuer: 'http://localhost:3001',
demoVerifier: 'http://localhost:3002',
};
1 change: 0 additions & 1 deletion apps/holder/projects/browser-extension/src/manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"$schema": "https://json.schemastore.org/chrome-manifest",
"name": "Wallet",
"version": "1",
"description": "A SSI wallet to manage credentials",
Expand Down
26 changes: 13 additions & 13 deletions apps/holder/projects/pwa/src/assets/config/config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
globalThis.environment = {
backendUrl: 'https://backend.wallet.mollik.io',
keycloakHost: 'https://auth.wallet.mollik.io',
keycloakClient: 'browser',
keycloakRealm: 'wallet',
demoIssuer: 'https://issuer.wallet.mollik.io',
demoVerifier: 'https://verifier.wallet.mollik.io',
};

// globalThis.environment = {
// backendUrl: 'http://localhost:3000',
// keycloakHost: 'http://localhost:8080',
// backendUrl: 'https://backend.wallet.mollik.io',
// keycloakHost: 'https://auth.wallet.mollik.io',
// keycloakClient: 'browser',
// keycloakRealm: 'wallet',
// demoIssuer: 'http://localhost:3001',
// demoVerifier: 'http://localhost:3002',
// demoIssuer: 'https://issuer.wallet.mollik.io',
// demoVerifier: 'https://verifier.wallet.mollik.io',
// };

globalThis.environment = {
backendUrl: 'http://localhost:3000',
keycloakHost: 'http://localhost:8080',
keycloakClient: 'browser',
keycloakRealm: 'wallet',
demoIssuer: 'http://localhost:3001',
demoVerifier: 'http://localhost:3002',
};
22 changes: 11 additions & 11 deletions apps/issuer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,29 @@
"devDependencies": {
"@types/uuid": "^9.0.8",
"axios": "^1.6.8",
"globals": "^15.0.0",
"globals": "^15.1.0",
"tsc-watch": "^6.2.0",
"typescript": "^5.4.3",
"vitest": "^1.4.0"
"typescript": "^5.4.5",
"vitest": "^1.5.2"
},
"dependencies": {
"@noble/hashes": "1.2.0",
"@sd-jwt/crypto-nodejs": "^0.6.1",
"@sd-jwt/sd-jwt-vc": "^0.6.1",
"@sd-jwt/types": "^0.6.1",
"@sphereon/oid4vci-common": "^0.10.1",
"@sphereon/oid4vci-issuer": "^0.10.2",
"@sphereon/oid4vci-issuer-server": "^0.10.2",
"@sphereon/ssi-express-support": "0.18.1",
"@sphereon/ssi-types": "^0.21.0",
"@sphereon/oid4vci-common": "^0.10.3",
"@sphereon/oid4vci-issuer": "^0.10.3",
"@sphereon/oid4vci-issuer-server": "^0.10.3",
"@sphereon/ssi-express-support": "^0.23.4",
"@sphereon/ssi-types": "^0.23.4",
"did-resolver": "^4.1.0",
"uuid": "^9.0.1",
"dotenv": "^16.4.5",
"express": "^4.19.2",
"express-list-routes": "^1.2.1",
"jose": "^5.2.3",
"jose": "^5.2.4",
"passport-azure-ad": "^4.3.5",
"passport-http-bearer": "^1.0.1"
"passport-http-bearer": "^1.0.1",
"uuid": "^9.0.1"
},
"peerDependencies": {
"awesome-qr": "^2.1.5-rc.0"
Expand Down
3 changes: 1 addition & 2 deletions apps/issuer/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,7 @@ vcIssuerServer.router.post('/request', async (req, res) => {
//we are returning the response to the client
res.send(response);
} catch (error) {
console.error(error);
res.status(402);
res.status(422).send();
}
});

Expand Down
18 changes: 9 additions & 9 deletions apps/verifier/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,30 @@
"license": "Apache-2.0",
"devDependencies": {
"@types/uuid": "^9.0.8",
"globals": "^15.0.0",
"globals": "^15.1.0",
"tsc-watch": "^6.2.0",
"typescript": "^5.4.4",
"vitest": "^1.4.0"
"typescript": "^5.4.5",
"vitest": "^1.5.2"
},
"dependencies": {
"@noble/hashes": "1.2.0",
"@sd-jwt/core": "^0.6.1",
"@sd-jwt/crypto-nodejs": "^0.6.1",
"@sd-jwt/sd-jwt-vc": "^0.6.1",
"@sd-jwt/types": "^0.6.1",
"@sphereon/did-auth-siop": "^0.6.3",
"@sphereon/pex-models": "^2.2.2",
"@sphereon/ssi-express-support": "^0.21.0",
"@sphereon/ssi-types": "^0.22.0",
"@sphereon/did-auth-siop": "^0.6.4",
"@sphereon/pex-models": "^2.2.4",
"@sphereon/ssi-express-support": "^0.23.4",
"@sphereon/ssi-types": "^0.23.4",
"axios": "^1.6.8",
"did-resolver": "^4.1.0",
"uuid": "^9.0.1",
"dotenv": "^16.4.5",
"express": "^4.19.2",
"express-list-routes": "^1.2.1",
"jose": "^5.2.4",
"passport-azure-ad": "^4.3.5",
"passport-http-bearer": "^1.0.1"
"passport-http-bearer": "^1.0.1",
"uuid": "^9.0.1"
},
"peerDependencies": {
"awesome-qr": "^2.1.5-rc.0"
Expand Down
Loading

0 comments on commit f76bbe0

Please sign in to comment.