UNPKG

@mercury-labs/auth

Version:

Mercury framework auth library. It supports local auth, jwt with both bearer token and cookie, basic auth.

11 lines 528 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CurrentUser = exports.currentUserDecoratorFactory = void 0; const common_1 = require("@nestjs/common"); function currentUserDecoratorFactory(data, ctx) { const request = ctx.switchToHttp().getRequest(); return request.user; } exports.currentUserDecoratorFactory = currentUserDecoratorFactory; exports.CurrentUser = (0, common_1.createParamDecorator)(currentUserDecoratorFactory); //# sourceMappingURL=auth.current-user.decorator.js.map