* BAEL-509: Initial Commit - working but needs a few fixes to REST API, etc.

* Fixed Authentication Failure - added subscription handlers - sufficient for Websocket Authentication/Authorization - still some issues to resolve with subscriptions and REST API

* Final version

* CSRF token controller - cleanup of chat wrapper
This commit is contained in:
Adam InTae Gerard
2017-07-04 03:57:27 +01:00
committed by KevinGilmore
parent 70ae331cd7
commit db2bb252de
47 changed files with 1654 additions and 0 deletions
@@ -0,0 +1,18 @@
INSERT INTO user (user_id, username, password)
VALUES (1, 'user', 'password');
INSERT INTO user (user_id, username, password)
VALUES (2, 'admin','password');
INSERT INTO user (user_id, username, password)
VALUES (3, 'mary','password');
INSERT INTO role (role_id, role)
VALUES (1, 'USER');
INSERT INTO role (role_id, role)
VALUES (2, 'ADMIN');
INSERT INTO user_role (id, user_id, role_id)
VALUES (1, 1, 1);
INSERT INTO user_role (id, user_id, role_id)
VALUES (2, 2, 2);
INSERT INTO user_role (id, user_id, role_id)
VALUES (3, 3, 1);
@@ -0,0 +1,26 @@
DROP TABLE IF EXISTS user;
CREATE TABLE user (
user_id INT(11) NOT NULL AUTO_INCREMENT,
username VARCHAR(45) NOT NULL ,
password VARCHAR(45) NOT NULL ,
UNIQUE KEY uni_user_username (username),
PRIMARY KEY (user_id)
);
DROP TABLE IF EXISTS role;
CREATE TABLE role (
role_id INT(11) NOT NULL AUTO_INCREMENT,
role VARCHAR(45) NOT NULL,
UNIQUE KEY uni_role_role (role),
PRIMARY KEY (role_id)
);
/** JOIN TABLES */
DROP TABLE IF EXISTS user_role;
CREATE TABLE user_role(
id INT(11) NOT NULL AUTO_INCREMENT,
user_id INT(11) NOT NULL,
role_id INT(11) NOT NULL,
PRIMARY KEY (id)
);