1 | "use strict";
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
18 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
19 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
20 | 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;
|
21 | return c > 3 && r && Object.defineProperty(target, key, r), r;
|
22 | };
|
23 | var __metadata = (this && this.__metadata) || function (k, v) {
|
24 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
25 | };
|
26 | Object.defineProperty(exports, "__esModule", { value: true });
|
27 | exports.ElectronSecurityTokenService = void 0;
|
28 | const electron_1 = require("@theia/electron/shared/electron");
|
29 | const inversify_1 = require("inversify");
|
30 | const electron_token_1 = require("../electron-common/electron-token");
|
31 | let ElectronSecurityTokenService = class ElectronSecurityTokenService {
|
32 | async setElectronSecurityTokenCookie(url) {
|
33 | await electron_1.session.defaultSession.cookies.set({
|
34 | url,
|
35 | name: electron_token_1.ElectronSecurityToken,
|
36 | value: JSON.stringify(this.electronSecurityToken),
|
37 | httpOnly: true,
|
38 | sameSite: 'no_restriction'
|
39 | });
|
40 | }
|
41 | };
|
42 | __decorate([
|
43 | (0, inversify_1.inject)(electron_token_1.ElectronSecurityToken),
|
44 | __metadata("design:type", Object)
|
45 | ], ElectronSecurityTokenService.prototype, "electronSecurityToken", void 0);
|
46 | ElectronSecurityTokenService = __decorate([
|
47 | (0, inversify_1.injectable)()
|
48 | ], ElectronSecurityTokenService);
|
49 | exports.ElectronSecurityTokenService = ElectronSecurityTokenService;
|
50 |
|
\ | No newline at end of file |