2016-03-21 05:56:33 -05:00
|
|
|
'use strict'
|
|
|
|
|
2016-04-14 15:06:11 -05:00
|
|
|
const express = require('express')
|
|
|
|
const oAuth2 = require('../../../middlewares/oauth2')
|
2016-03-21 05:56:33 -05:00
|
|
|
|
|
|
|
const middleware = require('../../../middlewares')
|
|
|
|
const cacheMiddleware = middleware.cache
|
|
|
|
|
|
|
|
const router = express.Router()
|
|
|
|
|
2016-04-14 15:06:11 -05:00
|
|
|
router.post('/token', cacheMiddleware.cache(false), oAuth2.token, success)
|
2016-03-21 05:56:33 -05:00
|
|
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
module.exports = router
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
function success (req, res, next) {
|
|
|
|
res.end()
|
|
|
|
}
|