Skip to content

Commit

Permalink
Update SQL file in the template.
Browse files Browse the repository at this point in the history
  • Loading branch information
dannywillems committed Nov 3, 2016
1 parent 3a25efd commit a342910
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions template.distillery/PROJECT_NAME.sql
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,31 @@ CREATE SCHEMA ocsigen_start

CREATE TABLE preregister (
email citext NOT NULL
)
-- Table for OAuth2.0 server. An Eliom application can be an OAuth2.0 server.
-- Its client can be an Eliom application, but not always.

---- Table to represent and register clients
CREATE TABLE oauth2_server_client (
id bigserial primary key,
application_name text not NULL,
description text not NULL,
redirect_uri text not NULL,
client_id text not NULL,
client_secret text not NULL
)

-- Table for OAuth2.0 client. An Eliom application can be a OAuth2.0 client of a
-- OAuth2.0 server which can be also an Eliom application, but not always.
CREATE TABLE oauth2_client_credentials (
-- Is it very useful ? Remove it implies an application can be a OAuth
-- client of a OAuth server only one time. For the moment, algorithms works
-- with the server_id which are the name and so id is useless.
id bigserial primary key,
server_id text not NULL, -- to remember which OAuth2.0 server is. The server name can be used.
server_authorization_url text not NULL,
server_token_url text not NULL,
server_data_url text not NULL,
client_id text not NULL,
client_secret text not NULL
);

0 comments on commit a342910

Please sign in to comment.