IF Commons GitHub

verifiedDomain

concept

A domain that a tenant has proved to be its own, and what that means for those who sign in with it

Model identity. Written in commons/data/models/identity/concepts.ts:353. Identified by verifiedDomainId.

Governance: attributes

domaintextrequired

The domain, unique across every tenant

Becomes the column domain of verified_domain.

Written at commons/data/models/identity/concepts.ts:357

lastCheckedAtinstantoptional

When it was last checked still to be the tenant's

Becomes the column last_checked_at of verified_domain.

Written at commons/data/models/identity/concepts.ts:360

policycode of domainPolicyrequired

What it means for those who sign in with it

Becomes the column policy of verified_domain.

Written at commons/data/models/identity/concepts.ts:359

verifiedAtinstantrequired

When it was proved

Becomes the column verified_at of verified_domain.

Written at commons/data/models/identity/concepts.ts:358

verifiedDomainIdidentifierrequired

What identifies the domain, made by the application

Becomes the column verified_domain_id of verified_domain.

Written at commons/data/models/identity/concepts.ts:356

Governance: relationships

tenantone

The tenant it is proved for To tenant. Written at commons/data/models/identity/concepts.ts:466

Logical: the table

Projects to the table verified_domain with the primary key verified_domain_id.

ColumnTypeNullRoleFrom
domaintextfalseattributeverifiedDomain.domain
last_checked_attimestamptrueattributeverifiedDomain.lastCheckedAt
policytextfalseattributeverifiedDomain.policy
tenant_idtextfalsereferenceverifiedDomain.tenant
verified_attimestampfalseattributeverifiedDomain.verifiedAt
verified_domain_idtextfalseattributeverifiedDomain.verifiedDomainId

Physical: SQL

CREATE TABLE IF NOT EXISTS "verified_domain" (
    "verified_domain_id" VARCHAR NOT NULL PRIMARY KEY,
    "domain" VARCHAR NOT NULL,
    "verified_at" TIMESTAMPTZ NOT NULL,
    "policy" VARCHAR NOT NULL,
    "last_checked_at" TIMESTAMPTZ,
    "tenant_id" VARCHAR NOT NULL,
    CONSTRAINT "verified_domain_tenant_id_fk" FOREIGN KEY ("tenant_id") REFERENCES "tenant" ("tenant_id"),
    CONSTRAINT "verified_domain_domain_uq" UNIQUE ("domain"),
    CONSTRAINT "verified_domain_policy_ck" CHECK ("policy" IN ('none', 'capture_users', 'enforce_sso'))
);

Physical: the typed table

Read and written from TypeScript with the types the model gives: import { verifiedDomain } from "@intellectual-frontiers/data/sql/typed/models". Generated in commons/data/sql/typed/models/identity.auto.ts: do not edit.

import { from } from "@intellectual-frontiers/data/sql/typed";
import { verifiedDomain } from "@intellectual-frontiers/data/sql/typed/models";

const rows = await from(verifiedDomain).select((s) => ({ verifiedDomainId: s.verifiedDomain.verifiedDomainId, domain: s.verifiedDomain.domain })).run(runner);

Titles, headings, exports, tables, columns and requirements. Esc closes.