UNPKG

n8n

Version:

n8n Workflow Automation Tool

27 lines 1.41 kB
"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.OAuthJweServiceProxy = void 0; const di_1 = require("@n8n/di"); const n8n_workflow_1 = require("n8n-workflow"); let OAuthJweServiceProxy = class OAuthJweServiceProxy { setHandler(handler) { this.handler = handler; } async decryptOAuth2TokenData(tokenData) { if (!this.handler) { throw new n8n_workflow_1.UserError('OAuth2 JWE decryption was requested but the feature is not enabled on this instance'); } return await this.handler.decryptOAuth2TokenData(tokenData); } }; exports.OAuthJweServiceProxy = OAuthJweServiceProxy; exports.OAuthJweServiceProxy = OAuthJweServiceProxy = __decorate([ (0, di_1.Service)() ], OAuthJweServiceProxy); //# sourceMappingURL=oauth-jwe-service.proxy.js.map