This repository has been archived by the owner on Jul 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from lalithkota/develop-ml-sdk
Reorganized G2P Connect ID Mapper Callback
- Loading branch information
Showing
21 changed files
with
634 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2450,4 +2450,4 @@ | |
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
CREATE TYPE public.loginprovidertypes AS ENUM ( | ||
'oauth2_auth_code' | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
CREATE TABLE fa_construct_strategy ( | ||
id integer NOT NULL, | ||
strategy character varying NOT NULL, | ||
created_at timestamp without time zone NOT NULL, | ||
updated_at timestamp without time zone, | ||
active boolean NOT NULL | ||
); | ||
|
||
CREATE TABLE dfsp_providers ( | ||
id integer NOT NULL, | ||
name character varying NOT NULL, | ||
description character varying, | ||
code character varying(20) NOT NULL, | ||
strategy_id integer NOT NULL, | ||
created_at timestamp without time zone NOT NULL, | ||
updated_at timestamp without time zone, | ||
active boolean NOT NULL | ||
); | ||
|
||
CREATE TABLE id_providers ( | ||
id integer NOT NULL, | ||
name character varying NOT NULL, | ||
description character varying, | ||
code character varying(20) NOT NULL, | ||
strategy_id integer NOT NULL, | ||
created_at timestamp without time zone NOT NULL, | ||
updated_at timestamp without time zone, | ||
active boolean NOT NULL | ||
); | ||
|
||
CREATE TABLE login_providers ( | ||
id integer NOT NULL, | ||
name character varying NOT NULL, | ||
type public.loginprovidertypes NOT NULL, | ||
description character varying, | ||
login_button_text character varying, | ||
login_button_image_url character varying, | ||
authorization_parameters json NOT NULL, | ||
id_provider_id integer, | ||
created_at timestamp without time zone NOT NULL, | ||
updated_at timestamp without time zone, | ||
active boolean NOT NULL | ||
); | ||
|
||
CREATE TABLE dfsp_levels ( | ||
id integer NOT NULL, | ||
name character varying NOT NULL, | ||
code character varying(20) NOT NULL, | ||
level integer NOT NULL, | ||
next_level_id integer, | ||
validation_regex character varying, | ||
created_at timestamp without time zone NOT NULL, | ||
updated_at timestamp without time zone, | ||
active boolean NOT NULL | ||
); | ||
|
||
CREATE TABLE dfsp_level_values ( | ||
id integer NOT NULL, | ||
name character varying NOT NULL, | ||
code character varying(20) NOT NULL, | ||
parent_id integer, | ||
level_id integer NOT NULL, | ||
next_level_id integer, | ||
dfsp_provider_id integer, | ||
created_at timestamp without time zone NOT NULL, | ||
updated_at timestamp without time zone, | ||
active boolean NOT NULL | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
CREATE SEQUENCE dfsp_level_values_id_seq | ||
AS integer | ||
START WITH 1 | ||
INCREMENT BY 1 | ||
NO MINVALUE | ||
NO MAXVALUE | ||
CACHE 1; | ||
|
||
ALTER SEQUENCE dfsp_level_values_id_seq OWNED BY dfsp_level_values.id; | ||
|
||
CREATE SEQUENCE dfsp_levels_id_seq | ||
AS integer | ||
START WITH 1 | ||
INCREMENT BY 1 | ||
NO MINVALUE | ||
NO MAXVALUE | ||
CACHE 1; | ||
|
||
ALTER SEQUENCE dfsp_levels_id_seq OWNED BY dfsp_levels.id; | ||
|
||
CREATE SEQUENCE dfsp_providers_id_seq | ||
AS integer | ||
START WITH 1 | ||
INCREMENT BY 1 | ||
NO MINVALUE | ||
NO MAXVALUE | ||
CACHE 1; | ||
|
||
ALTER SEQUENCE dfsp_providers_id_seq OWNED BY dfsp_providers.id; | ||
|
||
CREATE SEQUENCE fa_construct_strategy_id_seq | ||
AS integer | ||
START WITH 1 | ||
INCREMENT BY 1 | ||
NO MINVALUE | ||
NO MAXVALUE | ||
CACHE 1; | ||
|
||
ALTER SEQUENCE fa_construct_strategy_id_seq OWNED BY fa_construct_strategy.id; | ||
|
||
CREATE SEQUENCE id_providers_id_seq | ||
AS integer | ||
START WITH 1 | ||
INCREMENT BY 1 | ||
NO MINVALUE | ||
NO MAXVALUE | ||
CACHE 1; | ||
|
||
ALTER SEQUENCE id_providers_id_seq OWNED BY id_providers.id; | ||
|
||
CREATE SEQUENCE login_providers_id_seq | ||
AS integer | ||
START WITH 1 | ||
INCREMENT BY 1 | ||
NO MINVALUE | ||
NO MAXVALUE | ||
CACHE 1; | ||
|
||
ALTER SEQUENCE login_providers_id_seq OWNED BY login_providers.id; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
ALTER TABLE ONLY dfsp_level_values ALTER COLUMN id SET DEFAULT nextval('dfsp_level_values_id_seq'::regclass); | ||
|
||
ALTER TABLE ONLY dfsp_levels ALTER COLUMN id SET DEFAULT nextval('dfsp_levels_id_seq'::regclass); | ||
|
||
ALTER TABLE ONLY dfsp_providers ALTER COLUMN id SET DEFAULT nextval('dfsp_providers_id_seq'::regclass); | ||
|
||
ALTER TABLE ONLY fa_construct_strategy ALTER COLUMN id SET DEFAULT nextval('fa_construct_strategy_id_seq'::regclass); | ||
|
||
ALTER TABLE ONLY id_providers ALTER COLUMN id SET DEFAULT nextval('id_providers_id_seq'::regclass); | ||
|
||
ALTER TABLE ONLY login_providers ALTER COLUMN id SET DEFAULT nextval('login_providers_id_seq'::regclass); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
ALTER TABLE ONLY dfsp_level_values | ||
ADD CONSTRAINT dfsp_level_values_pkey PRIMARY KEY (id); | ||
|
||
ALTER TABLE ONLY dfsp_levels | ||
ADD CONSTRAINT dfsp_levels_pkey PRIMARY KEY (id); | ||
|
||
ALTER TABLE ONLY dfsp_providers | ||
ADD CONSTRAINT dfsp_providers_pkey PRIMARY KEY (id); | ||
|
||
ALTER TABLE ONLY fa_construct_strategy | ||
ADD CONSTRAINT fa_construct_strategy_pkey PRIMARY KEY (id); | ||
|
||
ALTER TABLE ONLY id_providers | ||
ADD CONSTRAINT id_providers_pkey PRIMARY KEY (id); | ||
|
||
ALTER TABLE ONLY login_providers | ||
ADD CONSTRAINT login_providers_pkey PRIMARY KEY (id); | ||
|
||
ALTER TABLE ONLY dfsp_level_values | ||
ADD CONSTRAINT dfsp_level_values_dfsp_provider_id_fkey FOREIGN KEY (dfsp_provider_id) REFERENCES dfsp_providers(id); | ||
|
||
ALTER TABLE ONLY dfsp_level_values | ||
ADD CONSTRAINT dfsp_level_values_level_id_fkey FOREIGN KEY (level_id) REFERENCES dfsp_levels(id); | ||
|
||
ALTER TABLE ONLY dfsp_level_values | ||
ADD CONSTRAINT dfsp_level_values_next_level_id_fkey FOREIGN KEY (next_level_id) REFERENCES dfsp_levels(id); | ||
|
||
ALTER TABLE ONLY dfsp_level_values | ||
ADD CONSTRAINT dfsp_level_values_parent_id_fkey FOREIGN KEY (parent_id) REFERENCES dfsp_level_values(id); | ||
|
||
ALTER TABLE ONLY dfsp_levels | ||
ADD CONSTRAINT dfsp_levels_next_level_id_fkey FOREIGN KEY (next_level_id) REFERENCES dfsp_levels(id) NOT VALID; | ||
|
||
ALTER TABLE ONLY dfsp_providers | ||
ADD CONSTRAINT dfsp_providers_strategy_id_fkey FOREIGN KEY (strategy_id) REFERENCES fa_construct_strategy(id); | ||
|
||
ALTER TABLE ONLY id_providers | ||
ADD CONSTRAINT id_providers_strategy_id_fkey FOREIGN KEY (strategy_id) REFERENCES fa_construct_strategy(id); | ||
|
||
ALTER TABLE ONLY login_providers | ||
ADD CONSTRAINT login_providers_id_provider_id_fkey FOREIGN KEY (id_provider_id) REFERENCES id_providers(id); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
INSERT INTO fa_construct_strategy VALUES (1, 'account:{account_no}@{branch}.{bank}.{type}', CURRENT_TIMESTAMP, NULL, true); | ||
INSERT INTO fa_construct_strategy VALUES (2, 'account:{phone}@{wallet}.{type}', CURRENT_TIMESTAMP, NULL, true); | ||
INSERT INTO fa_construct_strategy VALUES (3, 'email:{email}.{type}', CURRENT_TIMESTAMP, NULL, true); | ||
INSERT INTO fa_construct_strategy VALUES (4, 'token:{sub}@nationalId', CURRENT_TIMESTAMP, NULL, true); | ||
|
||
|
||
INSERT INTO dfsp_providers VALUES (1, 'Bank 1', 'Bank 1', 'dfsp1', 1, CURRENT_TIMESTAMP, NULL, true); | ||
INSERT INTO dfsp_providers VALUES (2, 'Bank 2', 'Bank 2', 'dfsp2', 1, CURRENT_TIMESTAMP, NULL, true); | ||
INSERT INTO dfsp_providers VALUES (3, 'Pink Wallet', 'Pink Wallet dfsp', 'testingtoolkitdfsp', 2, CURRENT_TIMESTAMP, NULL, true); | ||
INSERT INTO dfsp_providers VALUES (4, 'MPesa', 'MPesa Provider', 'mpesa', 3, CURRENT_TIMESTAMP, NULL, true); | ||
|
||
|
||
INSERT INTO dfsp_levels VALUES (1, 'Type', 'type', 0, NULL, NULL, CURRENT_TIMESTAMP, NULL, true); | ||
INSERT INTO dfsp_levels VALUES (2, 'Bank', 'bank', 1, NULL, NULL, CURRENT_TIMESTAMP, NULL, true); | ||
INSERT INTO dfsp_levels VALUES (3, 'Wallet Provider', 'wallet', 1, NULL, NULL, CURRENT_TIMESTAMP, NULL, true); | ||
INSERT INTO dfsp_levels VALUES (4, 'Branch', 'branch', 2, NULL, NULL, CURRENT_TIMESTAMP, NULL, true); | ||
INSERT INTO dfsp_levels VALUES (5, 'Email', 'email', -1, NULL, NULL, CURRENT_TIMESTAMP, NULL, true); | ||
INSERT INTO dfsp_levels VALUES (6, 'Account Number', 'account_no', -1, NULL, NULL, CURRENT_TIMESTAMP, NULL, true); | ||
INSERT INTO dfsp_levels VALUES (7, 'Phone Number', 'phone', -1, NULL, NULL, CURRENT_TIMESTAMP, NULL, true); | ||
|
||
|
||
INSERT INTO dfsp_level_values VALUES (1, 'Bank Account', 'bank_acc', NULL, 1, NULL, NULL, CURRENT_TIMESTAMP, NULL, true); | ||
INSERT INTO dfsp_level_values VALUES (2, 'Wallet', 'wallet', NULL, 1, NULL, NULL, CURRENT_TIMESTAMP, NULL, true); | ||
INSERT INTO dfsp_level_values VALUES (3, 'MPesa', 'mpesa', NULL, 1, NULL, 4, CURRENT_TIMESTAMP, NULL, true); | ||
INSERT INTO dfsp_level_values VALUES (4, 'Bank 1', 'dfsp1', 1, 2, NULL, 1, CURRENT_TIMESTAMP, NULL, true); | ||
INSERT INTO dfsp_level_values VALUES (5, 'Bank 2', 'dfsp2', 1, 2, NULL, 2, CURRENT_TIMESTAMP, NULL, true); | ||
INSERT INTO dfsp_level_values VALUES (6, 'Pink Wallet', 'testingtoolkitdfsp', 2, 3, NULL, 3, CURRENT_TIMESTAMP, NULL, true); | ||
INSERT INTO dfsp_level_values VALUES (7, 'Indigo Branch', 'indigo', 4, 4, NULL, NULL, CURRENT_TIMESTAMP, NULL, true); | ||
INSERT INTO dfsp_level_values VALUES (8, 'Rhino Branch', 'rhino', 4, 4, NULL, NULL, CURRENT_TIMESTAMP, NULL, true); | ||
INSERT INTO dfsp_level_values VALUES (9, 'Purple Branch', 'purple', 5, 4, NULL, NULL, CURRENT_TIMESTAMP, NULL, true); | ||
INSERT INTO dfsp_level_values VALUES (10, 'Rainbow Branch', 'rainbow', 5, 4, NULL, NULL, CURRENT_TIMESTAMP, NULL, true); | ||
|
||
UPDATE dfsp_level_values SET next_level_id = 2 WHERE id = 1; | ||
UPDATE dfsp_level_values SET next_level_id = 3 WHERE id = 2; | ||
UPDATE dfsp_level_values SET next_level_id = 5 WHERE id = 3; | ||
UPDATE dfsp_level_values SET next_level_id = 4 WHERE id = 4; | ||
UPDATE dfsp_level_values SET next_level_id = 4 WHERE id = 5; | ||
UPDATE dfsp_level_values SET next_level_id = 7 WHERE id = 6; | ||
UPDATE dfsp_level_values SET next_level_id = 6 WHERE id = 7; | ||
UPDATE dfsp_level_values SET next_level_id = 6 WHERE id = 8; | ||
UPDATE dfsp_level_values SET next_level_id = 6 WHERE id = 9; | ||
UPDATE dfsp_level_values SET next_level_id = 6 WHERE id = 10; | ||
|
||
|
||
INSERT INTO id_providers VALUES (1, 'National ID', 'National ID Provider', 'nationalId', 4, CURRENT_TIMESTAMP, NULL, true); | ||
|
||
|
||
INSERT INTO login_providers VALUES (1, 'Esignet', 'oauth2_auth_code', 'Esignet', 'Signin with National ID', 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADkAAAA5CAYAAACMGIOFAAAABHNCSVQICAgIfAhkiAAAEmdJREFUaIG9mnmcVMW1x7+nbvdsTHfPMMCwyjbsiCYYJIkaVMS4IiEOCDpCUHFhETWJT5Mw0bxnEmOe0YAgwkMUgZGAiMaAGpO8RERFkEVZRkGBkWGd7p59+tZ5f3T3MN2zsDh59fncz6e76my/qlN1zzl1hVZo4XWZHYh4x6jqMMGcp2hPgTSFDCAMhICjCHtFZZ8Vu9exuqPKet9v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83ZVK83tMqIEXQiCtTUDkeO2x+i5AR2/gZ4SOeYQBy34YqMAWoRAQpDD51XrS/EItywKrzEwFvjK9HQmCtZnHOjK3RaEqlfzNRjaLyiP/urTc1LI61CkiAnBlbD6iaK1FOoDhYGVnvUq5MiNMF7tnyAcpjKF6N3nnGp+orlPGCfLcJ1zvqkbqfA5TMH5qBSrcmDplKVW4KTPt49pl+QHhG39ZlTd/8oVrnCpAjCe4jTDz0+Mlk15/ieRRki8Al8dVEpQNImqo8mOR6LsikzHt2HALIqNYBsbpRQ5o/Kzo4a/rHK87E3rMCCZA186NNHuR8lLcazLI/I9WpT5Bl6qY6Ebk7lsSOPjxnUCbK+THahomuK6p3BGZseb3eILHn1nsIHFTID0zfck3W9K3JKdm/DyRAm+mbS/zTt4wCmYBGk1hVfhZ+6hvt4zT+aZs3oPKBqlyYWuctQCU1aX8dF2Wsf8bHixrKtshgkP2omRbIzMrLmr7l5bMF97VAQvQwCszYvMyfZvLATFTkY1X5VZL490AGIObnie9Ds8zRlIH+mVsafYElyEr/8dq8wMyP5sjkv7XKR/fSGkLiLfS7oe38D2yqrxoEn/zm08C02N9qkCJRO88/a/OG1tR7qtaqIJNb8MmhrytSKso7mlrzWtbd2078O/U11/4PZqIf9V8fUJcAAAAASUVORK5CYII=', '{ | ||
"authorize_endpoint": "https://esignet.openg2p.sandbox.net/authorize", | ||
"token_endpoint": "https://esignet.openg2p.sandbox.net/v1/esignet/oauth/token", | ||
"validate_endpoint": "https://esignet.openg2p.sandbox.net/v1/esignet/oidc/userinfo", | ||
"jwks_endpoint": "https://esignet.openg2p.sandbox.net/v1/esignet/oauth/.well-known/jwks.json", | ||
"client_id": "", | ||
"client_assertion_type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer", | ||
"client_assertion_jwk": {}, | ||
"response_type": "code", | ||
"scope": "openid profile email", | ||
"redirect_uri": "https://spar.openg2p.sandbox.net/spar/v1/oauth2/callback", | ||
"code_verifier": "_cHemmb3ZJIeSNj7ND1agM-G4HgmenFxPp3l-vnRKDU", | ||
"extra_authorize_parameters": { | ||
"acr_values":"mosip:idp:acr:generated-code mosip:idp:acr:biometrics mosip:idp:acr:linked-wallet", | ||
"claims": "{\"userinfo\":{\"name\":{\"essential\":true},\"phone_number\":{\"essential\":false},\"email\":{\"essential\":false},\"gender\":{\"essential\":true},\"birthdate\":{\"essential\":true},\"address\":{\"essential\":false},\"picture\":{\"essential\":false}},\"id_token\":{}}" | ||
} | ||
}', 1, CURRENT_TIMESTAMP, NULL, true); | ||
SELECT pg_catalog.setval('fa_construct_strategy_id_seq', 4, true); | ||
SELECT pg_catalog.setval('dfsp_providers_id_seq', 4, true); | ||
SELECT pg_catalog.setval('dfsp_levels_id_seq', 7, true); | ||
SELECT pg_catalog.setval('dfsp_level_values_id_seq', 10, false); | ||
SELECT pg_catalog.setval('id_providers_id_seq', 1, true); | ||
SELECT pg_catalog.setval('login_providers_id_seq', 1, true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
## Database Initialization Scripts | ||
|
||
### PostgreSQL | ||
|
||
- Create a new role/user called "sparuser" and create a new database called "spardb", | ||
with "sparuser" as the owner. | ||
No need to run this step if Postgres was installed through openg2p's deployment script. | ||
```sql | ||
CREATE ROLE sparuser WITH LOGIN NOSUPERUSER CREATEDB CREATEROLE INHERIT REPLICATION CONNECTION LIMIT -1 PASSWORD 'xxxxxx'; | ||
CREATE DATABASE spardb WITH OWNER = sparuser CONNECTION LIMIT = -1; | ||
``` | ||
- Then run | ||
```sh | ||
DB_HOST="openg2p.sandbox.net" \ | ||
DB_USER_PASSWORD="xxxxxx" \ | ||
./deploy.sh | ||
``` | ||
- The following optional Env vars can also be passed: | ||
- `VERSION="1.0.0"` Do not set this if you want latest version. | ||
- `DB_PORT="5432"` Default is 5432. | ||
- `DB_NAME="mydb"` Default is spardb. | ||
- `DB_USER="myuser"` Default is sparuser. | ||
- `DEPLOY_DDL="false"` Default is true. If false, will not run DDL scripts. | ||
- `DEPLOY_DML="false"` Default is true. If false, will not run DML scripts. | ||
- `LOG_DB_QUERY="true"` Default is false. Logs all Db queries. |
Oops, something went wrong.