├── .env.sample ├── .eslintrc.js ├── .gitignore ├── .vscode └── settings.json ├── LICENSE ├── README.md ├── benchmarks ├── basic-get.js ├── login-register.js └── users.json ├── package.json ├── src ├── api │ ├── fibonacci.js │ ├── index.js │ ├── isAuthenticated.js │ ├── login.js │ ├── logout.js │ ├── payment.js │ ├── register.js │ └── stealToken.js ├── app.js ├── auth │ └── passport.js ├── database │ └── index.js ├── index.js ├── middlewares.js ├── middlewares │ └── auth.js ├── models │ └── user.js ├── pages │ └── homepage.html └── redis │ └── index.js ├── test ├── api.test.js └── app.test.js └── yarn.lock /.env.sample: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipenywis/jwt-best-practices-server/HEAD/.env.sample -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipenywis/jwt-best-practices-server/HEAD/.eslintrc.js -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipenywis/jwt-best-practices-server/HEAD/.gitignore -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "jira-plugin.workingProject": "" 3 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipenywis/jwt-best-practices-server/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipenywis/jwt-best-practices-server/HEAD/README.md -------------------------------------------------------------------------------- /benchmarks/basic-get.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipenywis/jwt-best-practices-server/HEAD/benchmarks/basic-get.js -------------------------------------------------------------------------------- /benchmarks/login-register.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipenywis/jwt-best-practices-server/HEAD/benchmarks/login-register.js -------------------------------------------------------------------------------- /benchmarks/users.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipenywis/jwt-best-practices-server/HEAD/benchmarks/users.json -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipenywis/jwt-best-practices-server/HEAD/package.json -------------------------------------------------------------------------------- /src/api/fibonacci.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipenywis/jwt-best-practices-server/HEAD/src/api/fibonacci.js -------------------------------------------------------------------------------- /src/api/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipenywis/jwt-best-practices-server/HEAD/src/api/index.js -------------------------------------------------------------------------------- /src/api/isAuthenticated.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipenywis/jwt-best-practices-server/HEAD/src/api/isAuthenticated.js -------------------------------------------------------------------------------- /src/api/login.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipenywis/jwt-best-practices-server/HEAD/src/api/login.js -------------------------------------------------------------------------------- /src/api/logout.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipenywis/jwt-best-practices-server/HEAD/src/api/logout.js -------------------------------------------------------------------------------- /src/api/payment.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipenywis/jwt-best-practices-server/HEAD/src/api/payment.js -------------------------------------------------------------------------------- /src/api/register.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipenywis/jwt-best-practices-server/HEAD/src/api/register.js -------------------------------------------------------------------------------- /src/api/stealToken.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipenywis/jwt-best-practices-server/HEAD/src/api/stealToken.js -------------------------------------------------------------------------------- /src/app.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipenywis/jwt-best-practices-server/HEAD/src/app.js -------------------------------------------------------------------------------- /src/auth/passport.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipenywis/jwt-best-practices-server/HEAD/src/auth/passport.js -------------------------------------------------------------------------------- /src/database/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipenywis/jwt-best-practices-server/HEAD/src/database/index.js -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipenywis/jwt-best-practices-server/HEAD/src/index.js -------------------------------------------------------------------------------- /src/middlewares.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipenywis/jwt-best-practices-server/HEAD/src/middlewares.js -------------------------------------------------------------------------------- /src/middlewares/auth.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipenywis/jwt-best-practices-server/HEAD/src/middlewares/auth.js -------------------------------------------------------------------------------- /src/models/user.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipenywis/jwt-best-practices-server/HEAD/src/models/user.js -------------------------------------------------------------------------------- /src/pages/homepage.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipenywis/jwt-best-practices-server/HEAD/src/pages/homepage.html -------------------------------------------------------------------------------- /src/redis/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipenywis/jwt-best-practices-server/HEAD/src/redis/index.js -------------------------------------------------------------------------------- /test/api.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipenywis/jwt-best-practices-server/HEAD/test/api.test.js -------------------------------------------------------------------------------- /test/app.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipenywis/jwt-best-practices-server/HEAD/test/app.test.js -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipenywis/jwt-best-practices-server/HEAD/yarn.lock --------------------------------------------------------------------------------