algorithmtextrequiredThe signing algorithm
Becomes the column algorithm of key_credential.
A public key that a principal proves itself with by signing; the private half is never kept
Model identityMachine. Written in commons/data/models/identity-machine/mod.ts:71. Identified by credential.
algorithmtextrequiredThe signing algorithm
Becomes the column algorithm of key_credential.
publicJwkstructuredrequiredThe public key as a JSON Web Key
Becomes the column public_jwk of key_credential.
thumbprinttextrequiredThe RFC 7638 thumbprint of the key, unique; it is also what a proof of possession binds a token to
Becomes the column thumbprint of key_credential.
credentialoneThe credential it is To credential. Written at commons/data/models/identity-machine/mod.ts:71
Projects to the table key_credential with the primary key credential_id.
| Column | Type | Null | Role | From |
|---|---|---|---|---|
algorithm | text | false | attribute | keyCredential.algorithm |
credential_id | text | false | reference | keyCredential.credential |
public_jwk | json | false | attribute | keyCredential.publicJwk |
thumbprint | text | false | attribute | keyCredential.thumbprint |
CREATE TABLE IF NOT EXISTS "key_credential" (
"credential_id" VARCHAR NOT NULL PRIMARY KEY,
"public_jwk" JSON NOT NULL,
"thumbprint" VARCHAR NOT NULL,
"algorithm" VARCHAR NOT NULL,
CONSTRAINT "key_credential_credential_id_fk" FOREIGN KEY ("credential_id") REFERENCES "credential" ("credential_id"),
CONSTRAINT "key_credential_thumbprint_uq" UNIQUE ("thumbprint")
);CREATE TABLE IF NOT EXISTS "key_credential" (
"credential_id" TEXT NOT NULL PRIMARY KEY,
"public_jwk" JSONB NOT NULL,
"thumbprint" TEXT NOT NULL,
"algorithm" TEXT NOT NULL,
CONSTRAINT "key_credential_credential_id_fk" FOREIGN KEY ("credential_id") REFERENCES "credential" ("credential_id"),
CONSTRAINT "key_credential_thumbprint_uq" UNIQUE ("thumbprint")
);CREATE TABLE IF NOT EXISTS "key_credential" (
"credential_id" TEXT NOT NULL PRIMARY KEY,
"public_jwk" TEXT NOT NULL,
"thumbprint" TEXT NOT NULL,
"algorithm" TEXT NOT NULL,
CONSTRAINT "key_credential_credential_id_fk" FOREIGN KEY ("credential_id") REFERENCES "credential" ("credential_id"),
CONSTRAINT "key_credential_thumbprint_uq" UNIQUE ("thumbprint")
);Read and written from TypeScript with the types the model gives: import { keyCredential } from "@intellectual-frontiers/data/sql/typed/models". Generated in commons/data/sql/typed/models/identity-machine.auto.ts: do not edit.
import { from } from "@intellectual-frontiers/data/sql/typed";
import { keyCredential } from "@intellectual-frontiers/data/sql/typed/models";
const rows = await from(keyCredential).select((s) => ({ credentialId: s.keyCredential.credentialId, publicJwk: s.keyCredential.publicJwk })).run(runner);