UNPKG

@sync-in/server

Version:

The secure, open-source platform for file storage, sharing, collaboration, and sync

26 lines (25 loc) 946 B
/* * Copyright (C) 2012-2025 Johan Legrand <johan.legrand@sync-in.com> * This file is part of Sync-in | The open source file sync and share solution * See the LICENSE file for licensing details */ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "AuthTokenOptional", { enumerable: true, get: function() { return AuthTokenOptional; } }); const _common = require("@nestjs/common"); const _passport = require("@nestjs/passport"); const _authtokenskipdecorator = require("./auth-token-skip.decorator"); const AuthTokenOptional = ()=>{ // skip global auth access guard and apply guards successively to context return (0, _common.applyDecorators)((0, _authtokenskipdecorator.AuthTokenSkip)(), (0, _common.UseGuards)((0, _passport.AuthGuard)([ 'tokenAccess', 'anonymous' ]))); }; //# sourceMappingURL=auth-token-optional.decorator.js.map