aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/v1/users.js
blob: acb860c667be5a87478bf89433db6d1863c8b79b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
'use strict'

var express = require('express')
var oAuth2 = require('../../../middlewares/oauth2')

const middleware = require('../../../middlewares')
const cacheMiddleware = middleware.cache

const router = express.Router()

router.post('/token', cacheMiddleware.cache(false), oAuth2.token(), success)
router.get('/authenticate', cacheMiddleware.cache(false), oAuth2.authenticate(), success)

// ---------------------------------------------------------------------------

module.exports = router

// ---------------------------------------------------------------------------

function success (req, res, next) {
  res.end()
}