mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-20 12:46:36 +08:00
21 lines
449 B
TypeScript
21 lines
449 B
TypeScript
/// <reference path="./express-jwt.d.ts" />
|
|
|
|
import express = require('express');
|
|
import jwt = require('express-jwt');
|
|
import unless = require('express-unless');
|
|
|
|
var app = express();
|
|
|
|
app.use(jwt({
|
|
secret: 'shhhhhhared-secret'
|
|
}));
|
|
app.use(jwt({
|
|
secret: 'shhhhhhared-secret',
|
|
userProperty: 'auth'
|
|
}));
|
|
|
|
var jwtCheck = jwt({
|
|
secret: 'shhhhhhared-secret'
|
|
});
|
|
jwtCheck.unless = unless;
|
|
app.use(jwtCheck.unless({ path: '/api/login' })); |