UNPKG

typescript-rest-jwt

Version:

JWT authentication for typescript-rest via decorators.

20 lines 679 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var typescript_rest_1 = require("typescript-rest"); var AuthHandler_1 = require("./AuthHandler"); /** * Add auth to a route * * @param target The prototype of the class * @param propertyKey The name of the method * @param descriptor The descriptor */ function AuthPath(path) { // tslint:disable-next-line no-any return function (target, propertyKey, descriptor) { AuthHandler_1.AuthHandler.addPath(path, target, propertyKey); return typescript_rest_1.Path(path)(target, propertyKey, descriptor); }; } exports.AuthPath = AuthPath; //# sourceMappingURL=decorators.js.map