25 lines
658 B
TypeScript
25 lines
658 B
TypeScript
import { Router } from 'express'
|
|
import AuthController from '../controllers/auth.controller'
|
|
import { middleware } from '../auth'
|
|
|
|
const router = Router()
|
|
const authController = new AuthController()
|
|
|
|
router.get('/signin', authController.signin)
|
|
|
|
router.get('/signin/callback', authController.callback)
|
|
|
|
router.get('/me', middleware, authController.me as any)
|
|
|
|
router.get('/logout', middleware, authController.logout as any)
|
|
|
|
router.get('/refresh', middleware, authController.refresh as any)
|
|
|
|
router.get('/introspect', middleware, authController.introspect as any)
|
|
|
|
router.get('/', function (req, res) {
|
|
res.render('pages/auth')
|
|
})
|
|
|
|
export default router
|