mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
feat: add OIDC clients table
This commit is contained in:
parent
a7d939d88f
commit
ac53f7befb
4 changed files with 31 additions and 0 deletions
|
@ -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';
|
||||
|
|
19
packages/schemas/src/db-entries/oidc-client.ts
Normal file
19
packages/schemas/src/db-entries/oidc-client.ts
Normal 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);
|
|
@ -4,3 +4,8 @@ export type OidcModelInstancePayload = {
|
|||
uid?: string;
|
||||
grantId?: string;
|
||||
};
|
||||
|
||||
export type OidcClientMetadata = {
|
||||
redirect_uris: string[];
|
||||
post_logout_redirect_uris: string[];
|
||||
};
|
||||
|
|
6
packages/schemas/tables/oidc_clients.sql
Normal file
6
packages/schemas/tables/oidc_clients.sql
Normal 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)
|
||||
);
|
Loading…
Reference in a new issue