Deno Alosaur JTW Authentication

Requirements

Deno 1.6
Docker

version: "3.2"services:
redis:
container_name: redis
image: redis
restart: always
ports:
- "6379:6379"
const app = new App({areas: [AuthenticationArea],logging: false,});const sessionStore = new RedisSession('127.0.0.1', 6379);await sessionStore.init();const authMiddleware = new AuthMiddleware( [JWTSchema],);const sessionMiddleware = new SessionMiddleware(sessionStore,{ secret: 1122n, maxAge: DAYS_30, path: "/" },);app.use(new RegExp("/"), sessionMiddleware);app.use(new RegExp("/"), authMiddleware);app.useSecurityContext();app.listen();

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store