UNPKG
nf-workflow-ui-5
Version:
latest (2.10.0)
2.10.0
Workflow User Interface
github.com/Netflix/conductor
Netflix/conductor
nf-workflow-ui-5
/
src
/
api
/
middleware
/
filters
/
authFilter.js
16 lines
(12 loc)
•
265 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
export default
class
AuthFilter
{ init(app) { app.use((req, res,
next
) => { const { headers: { authorization =
''
} = {} } = req;
if
(!authorization) {
return
next
(); } req.token = authorization;
next
(); }); } }