Skip to content
This repository was archived by the owner on Mar 25, 2021. It is now read-only.

Commit 82767da

Browse files
committed
feat: local authentication
- introduce passport - add a passport local strategy for authentication - introduce Authentication interface to contain the multiple auth checks (authenticate, checkAuth, logout) - scram router module for authentication, logout, and auth check - no op for no auth - extend auth support to provide additional functions to all modules for checking auth, logging out - remove empty placeholder file Contributes to: #106 Signed-off-by: Nic Townsend <[email protected]>
1 parent f03fb17 commit 82767da

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1129
-236
lines changed

config/static.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ const client: Config<Literal> = {
1919
const server: Config<Literal> = {
2020
defaultConfig: {
2121
configValue: {
22-
authentication: {
23-
strategy: 'none',
24-
},
2522
client: {
2623
configOverrides: {},
2724
transport: {},
@@ -40,6 +37,9 @@ const server: Config<Literal> = {
4037
contextRoot: '/',
4138
port: 9080,
4239
transport: {},
40+
authentication: {
41+
type: 'none',
42+
},
4343
},
4444
session: {
4545
name: 'strimzi-ui',

linting/eslint.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const rulesets = [
1212

1313
const customRules = {
1414
// prefer spaces (2) over tabs for indentation - tab width can be changed, space cannot
15-
indent: ['error', 2],
15+
indent: ['error', 2, { SwitchCase: 1 }],
1616
// all lines to have semicolons to end statements
1717
semi: ['error', 'always'],
1818
};

package-lock.json

+122
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+11-1
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,22 @@
4545
"dependencies": {
4646
"@apollo/client": "^3.2.5",
4747
"@apollo/react-hooks": "^4.0.0",
48-
"@walmartlabs/json-to-simple-graphql-schema": "^2.0.3",
4948
"@types/express-session": "^1.17.2",
49+
"@walmartlabs/json-to-simple-graphql-schema": "^2.0.3",
50+
"apollo-client": "^2.6.10",
5051
"apollo-link-http": "^1.5.17",
5152
"apollo-server-express": "^2.18.2",
5253
"compression-webpack-plugin": "^6.0.5",
5354
"css-minimizer-webpack-plugin": "^1.1.5",
55+
"axios": "^0.21.0",
56+
"body-parser": "^1.19.0",
5457
"express": "^4.17.1",
5558
"express-session": "^1.17.1",
5659
"express-static-gzip": "^2.1.0",
5760
"fromentries": "^1.3.2",
5861
"graphql": "^15.4.0",
62+
"graphql-tag": "^2.11.0",
63+
"graphql-ws": "^1.14.0",
5964
"helmet": "^4.2.0",
6065
"html-webpack-plugin": "^5.0.0-alpha.14",
6166
"http-proxy": "^1.18.1",
@@ -68,6 +73,8 @@
6873
"lodash.set": "^4.3.2",
6974
"mini-css-extract-plugin": "^1.2.1",
7075
"mustache": "^4.0.1",
76+
"passport": "^0.4.1",
77+
"passport-local": "^1.0.0",
7178
"pino": "^6.7.0",
7279
"pino-filter": "^1.0.0",
7380
"pino-http": "^5.3.0",
@@ -99,6 +106,8 @@
99106
"@types/jest": "^26.0.15",
100107
"@types/mustache": "^4.0.1",
101108
"@types/node": "^14.14.6",
109+
"@types/passport": "^1.0.4",
110+
"@types/passport-local": "^1.0.33",
102111
"@types/pino": "^6.3.3",
103112
"@types/pino-http": "^5.0.5",
104113
"@types/react-dom": "^16.9.9",
@@ -127,6 +136,7 @@
127136
"license-check-and-add": "^3.0.4",
128137
"lint-staged": "^10.5.1",
129138
"mock-socket": "^9.0.3",
139+
"nock": "^13.0.5",
130140
"nodemon": "^2.0.6",
131141
"npm-run-all": "^4.1.5",
132142
"prettier": "^2.1.2",

0 commit comments

Comments
 (0)