Can login with SSO & change Password

This commit is contained in:
2019-10-09 21:57:56 +02:00
parent 20416ce108
commit a6f25bcbb2
16 changed files with 197 additions and 41 deletions

View File

@@ -10,6 +10,7 @@ ktor {
app {
envName = prod
domain = dc-project.fr
}
db {

View File

@@ -0,0 +1,15 @@
create or replace function find_citizen_by_email(_email text, out resource json) language plpgsql as
$$
begin
select to_json(t) into resource
from (
select
z.*,
find_user_by_id(z.user_id) as "user"
from citizen as z
where z.email = _email
) as t;
end;
$$;
-- drop function if exists find_citizen_by_email(text, out json);

View File

@@ -19,7 +19,7 @@ create table citizen
user_id uuid not null references "user" (id) unique,
vote_anonymous boolean default true not null,
follow_anonymous boolean default true not null,
email text not null check ( email ~* '.+@.+\..+' )
email text not null check ( email ~* '.+@.+\..+' ) unique
);
create table workgroup