|
|
|
@ -1,6 +1,6 @@ |
|
|
|
|
import express from 'express'; |
|
|
|
|
|
|
|
|
|
import { assertAuthentication } from '../lib/assertAuthentication'; |
|
|
|
|
import { authenticationHandler } from '../lib/assertAuthentication'; |
|
|
|
|
import { login, logout } from '../lib/request_handlers/auth'; |
|
|
|
|
import passport from '../passport'; |
|
|
|
|
|
|
|
|
@ -8,6 +8,6 @@ const router = express.Router(); |
|
|
|
|
|
|
|
|
|
router |
|
|
|
|
.post('/login', passport.authenticate('login'), login) |
|
|
|
|
.put('/logout', assertAuthentication(), logout); |
|
|
|
|
.put('/logout', authenticationHandler, logout); |
|
|
|
|
|
|
|
|
|
export default router; |
|
|
|
|