Skip to content

Commit

Permalink
fix identity service
Browse files Browse the repository at this point in the history
  • Loading branch information
eike-hass committed Aug 15, 2024
1 parent 80e2c60 commit 6517360
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions backend/src/identity/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ export interface DataSigningRequest {
data: Uint8Array;
/** Signing key's ID. */
keyId: string;
/** Key type of the key with id `key_id`. Valid values are: Ed25519, ES256, ES256K. */
keyType: string;
}

export interface DataSigningResponse {
Expand Down
2 changes: 2 additions & 0 deletions oid4vc/TangleLabs/src/remoteSigner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { dirname } from 'path';
import * as grpc from "@grpc/grpc-js";
import { loadSync } from "@grpc/proto-loader";
import { Signer } from 'did-jwt';
import { KeyType } from "@sphereon/did-resolver-jwk";

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
Expand All @@ -28,6 +29,7 @@ export const remoteSigner: (keyId: string) => Signer = (keyId) => async (data) =

const response = await new Promise((resolve, reject) => identityClient.sign({
keyId,
keyType: "ES256",
data: Uint8Array.from(Buffer.from(data)),
}, (err, response) => {
if (err) {
Expand Down
2 changes: 2 additions & 0 deletions shared/proto/identity/utils.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ message DataSigningRequest {
bytes data = 1;
// Signing key's ID.
string key_id = 2;
// Key type of the key with id `key_id`. Valid values are: Ed25519, ES256, ES256K.
string key_type = 3;
}

message DataSigningResponse {
Expand Down
5 changes: 3 additions & 2 deletions tooling/API/Identity/GRPC.http
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ GRPC /Jwt/create
GRPC /Signing/sign
{
"data": {{data}},
"keyId": "pK0JAYw5RFFKqorBn0x4w98zl2UBfRys"
"keyId": "UUMXMjmLiKKUChyHGRjiEdSVTSUDSMTD",
"keyType": "ES256"
}
###

Expand Down Expand Up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