mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-03 09:49:20 +02:00
Add authentications for routes that need it and adapts the tests
This commit is contained in:
parent
c9bf7d30bd
commit
0c1cbbfe29
15 changed files with 416 additions and 144 deletions
|
@ -1,15 +1,14 @@
|
|||
'use strict'
|
||||
|
||||
var express = require('express')
|
||||
var oAuth2 = require('../../../middlewares/oauth2')
|
||||
const express = require('express')
|
||||
const 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)
|
||||
router.post('/token', cacheMiddleware.cache(false), oAuth2.token, success)
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue