0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-06 20:40:08 -05:00

feat: add OIDC clients table

This commit is contained in:
Gao Sun 2021-07-05 00:17:40 +08:00
parent c48acd2a5b
commit 8f3950b5b2
4 changed files with 31 additions and 0 deletions

View file

@ -1,5 +1,6 @@
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
export * from './custom-types';
export * from './oidc-client';
export * from './oidc-model-instance';
export * from './user';

View file

@ -0,0 +1,19 @@
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
import { OidcClientMetadata } from '../foundations';
export type OidcClientDBEntry = {
clientId: string;
metadata: OidcClientMetadata;
createdAt: number;
};
export const OidcClients = Object.freeze({
table: 'oidc_clients',
fields: {
clientId: 'client_id',
metadata: 'metadata',
createdAt: 'created_at',
},
fieldKeys: ['clientId', 'metadata', 'createdAt'],
} as const);

View file

@ -4,3 +4,8 @@ export type OidcModelInstancePayload = {
uid?: string;
grantId?: string;
};
export type OidcClientMetadata = {
redirect_uris: string[];
post_logout_redirect_uris: string[];
};

View file

@ -0,0 +1,6 @@
create table oidc_clients (
client_id varchar(128) not null,
metadata jsonb /* @use OidcClientMetadata */ not null,
created_at bigint not null default(extract(epoch from now())),
primary key (client_id)
);