@@ -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