Skip to content

Commit 68e414e

Browse files
committed
Update SQL file in the template.
1 parent 23a6864 commit 68e414e

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

template.distillery/PROJECT_NAME.sql

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,31 @@ CREATE SCHEMA ocsigen_start
4747

4848
CREATE TABLE preregister (
4949
email citext NOT NULL
50+
)
51+
-- Table for OAuth2.0 server. An Eliom application can be an OAuth2.0 server.
52+
-- Its client can be an Eliom application, but not always.
53+
54+
---- Table to represent and register clients
55+
CREATE TABLE oauth2_server_client (
56+
id bigserial primary key,
57+
application_name text not NULL,
58+
description text not NULL,
59+
redirect_uri text not NULL,
60+
client_id text not NULL,
61+
client_secret text not NULL
62+
)
63+
64+
-- Table for OAuth2.0 client. An Eliom application can be a OAuth2.0 client of a
65+
-- OAuth2.0 server which can be also an Eliom application, but not always.
66+
CREATE TABLE oauth2_client_credentials (
67+
-- Is it very useful ? Remove it implies an application can be a OAuth
68+
-- client of a OAuth server only one time. For the moment, algorithms works
69+
-- with the server_id which are the name and so id is useless.
70+
id bigserial primary key,
71+
server_id text not NULL, -- to remember which OAuth2.0 server is. The server name can be used.
72+
server_authorization_url text not NULL,
73+
server_token_url text not NULL,
74+
server_data_url text not NULL,
75+
client_id text not NULL,
76+
client_secret text not NULL
5077
);

0 commit comments

Comments
 (0)