UNPKG

@sync-in/server

Version:

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

54 lines (53 loc) 1.42 kB
/* * 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 }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: Object.getOwnPropertyDescriptor(all, name).get }); } _export(exports, { get CSRF_ERROR () { return CSRF_ERROR; }, get CSRF_KEY () { return CSRF_KEY; }, get TOKEN_PATHS () { return TOKEN_PATHS; }, get TOKEN_TYPES () { return TOKEN_TYPES; }, get WS_KEY () { return WS_KEY; } }); const _tokeninterface = require("../interfaces/token.interface"); const _routes = require("./routes"); const CSRF_KEY = 'sync-in-csrf'; const WS_KEY = 'sync-in-ws'; const TOKEN_PATHS = { access: '/', refresh: _routes.API_AUTH_REFRESH, ws: _routes.API_AUTH_WS, csrf: '/' }; const TOKEN_TYPES = [ _tokeninterface.TOKEN_TYPE.REFRESH, _tokeninterface.TOKEN_TYPE.ACCESS, _tokeninterface.TOKEN_TYPE.WS, _tokeninterface.TOKEN_TYPE.CSRF ]; const CSRF_ERROR = { MISSING_JWT: 'Missing CSRF in JWT', MISSING_HEADERS: 'Missing CSRF in headers', MISMATCH: 'CSRF mismatch' }; //# sourceMappingURL=auth.js.map