parent
a7afcf4cd1
commit
c5c3058f3d
@ -1,9 +1,9 @@
|
|||||||
import * as jwt from "jsonwebtoken";
|
import * as jwt from "jsonwebtoken";
|
||||||
import {
|
import {
|
||||||
ExpressMiddlewareInterface, Middleware
|
ExpressMiddlewareInterface
|
||||||
} from "routing-controllers";
|
} from "routing-controllers";
|
||||||
|
|
||||||
@Middleware({ type: "before" })
|
// @Middleware({ type: "before" })
|
||||||
export class JWTAuth implements ExpressMiddlewareInterface {
|
export class JWTAuth implements ExpressMiddlewareInterface {
|
||||||
use(request: any, response: any, next?: (err?: any) => any): any {
|
use(request: any, response: any, next?: (err?: any) => any): any {
|
||||||
const token = <string>request.headers["auth"];
|
const token = <string>request.headers["auth"];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user