FSN#39750 App registraties tonen en kunnen wissen

svn path=/Database/trunk/; revision=33671
This commit is contained in:
Jos Groot Lipman
2017-05-03 10:26:08 +00:00
parent 6b04ffc3a8
commit e40f3c8e96
2 changed files with 7 additions and 2 deletions

View File

@@ -67,7 +67,7 @@ CREATE TABLE aut_idp_map
CONSTRAINT aut_k_idp_map_key PRIMARY KEY,
aut_idp_key
NUMBER(10)
CONSTRAINT aut_r_idp_map_id REFERENCES aut_idp(aut_idp_key),
CONSTRAINT aut_r_idp_map_id REFERENCES aut_idp(aut_idp_key) ON DELETE CASCADE,
aut_idp_map_from -- as sent in JWT
VARCHAR(100)
NOT NULL,
@@ -85,6 +85,7 @@ CREATE TABLE aut_idp_map
DEFAULT SYSDATE
);
-- Clients (zoals al dan niet native App's)
CREATE TABLE aut_client
(
aut_client_key
@@ -100,13 +101,14 @@ CREATE TABLE aut_client
VARCHAR2(320),
aut_client_secret
VARCHAR2(128),
aut_client_customuri -- future use
VARCHAR2(128),
aut_client_aanmaak
DATE
DEFAULT SYSDATE
);
-- Koppeling client en (toestemming gegeven door) perslid
-- TODO: Kan gebruiker app op meerdere toestallen inrichten?
CREATE TABLE aut_client_perslid
(
aut_client_perslid_key

View File

@@ -211,6 +211,7 @@ BEGIN
DELETE FROM FAC_GEBRUIKERSGROEP WHERE PRS_PERSLID_KEY = :old.prs_perslid_key;
-- Ook een stukje veiligheid
DELETE FROM fac_session WHERE prs_perslid_key = :old.prs_perslid_key;
DELETE FROM aut_client_perslid WHERE prs_perslid_key = :old.prs_perslid_key;
END;
-- Tenslotte: ruim de objecten die ik zelf mocht beheren op
-- Aandacht: zou nog steeds kunnen dat dit faalt, niet mekkeren, jammer dan
@@ -244,6 +245,8 @@ BEGIN
:new.prs_perslid_credentials_datum := SYSDATE;
DELETE FROM fac_session
WHERE prs_perslid_key = :new.prs_perslid_key;
DELETE FROM aut_client_perslid
WHERE prs_perslid_key = :old.prs_perslid_key;
END IF;
END;