@ts-core/oauth 3.1.5 → 3.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/go/GoUser.js +12 -0
- package/cjs/public-api.d.ts +3 -0
- package/cjs/public-api.js +3 -0
- package/cjs/tg/TgApiLoader.d.ts +16 -0
- package/cjs/tg/TgApiLoader.js +28 -0
- package/cjs/tg/TgAuth.d.ts +14 -0
- package/cjs/tg/TgAuth.js +58 -0
- package/cjs/tg/TgUser.d.ts +9 -0
- package/cjs/tg/TgUser.js +21 -0
- package/cjs/vk/VkAuth.js +1 -1
- package/esm/go/GoUser.js +12 -0
- package/esm/public-api.d.ts +3 -0
- package/esm/public-api.js +3 -0
- package/esm/tg/TgApiLoader.d.ts +16 -0
- package/esm/tg/TgApiLoader.js +24 -0
- package/esm/tg/TgAuth.d.ts +14 -0
- package/esm/tg/TgAuth.js +54 -0
- package/esm/tg/TgUser.d.ts +9 -0
- package/esm/tg/TgUser.js +17 -0
- package/esm/vk/VkAuth.js +1 -1
- package/package.json +1 -1
package/cjs/go/GoUser.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GoUser = void 0;
|
|
4
4
|
const OAuthUser_1 = require("../OAuthUser");
|
|
5
|
+
const _ = require("lodash");
|
|
5
6
|
class GoUser extends OAuthUser_1.OAuthUser {
|
|
6
7
|
parse(item) {
|
|
7
8
|
this.id = item.sub;
|
|
@@ -13,6 +14,17 @@ class GoUser extends OAuthUser_1.OAuthUser {
|
|
|
13
14
|
this.familyName = item.family_name;
|
|
14
15
|
}
|
|
15
16
|
parsePerson(item) {
|
|
17
|
+
if (!_.isEmpty(item.genders)) {
|
|
18
|
+
this.isMale = _.first(item.genders).value === 'male';
|
|
19
|
+
}
|
|
20
|
+
if (!_.isEmpty(item.birthdays)) {
|
|
21
|
+
for (let value of item.birthdays) {
|
|
22
|
+
if (!_.isNil(value.date) && !_.isNil(value.date.year) && !_.isNil(value.date.month) && !_.isNil(value.date.day)) {
|
|
23
|
+
this.birthday = new Date(value.date.year, value.date.month - 1, value.date.day);
|
|
24
|
+
break;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
16
28
|
}
|
|
17
29
|
}
|
|
18
30
|
exports.GoUser = GoUser;
|
package/cjs/public-api.d.ts
CHANGED
|
@@ -10,6 +10,9 @@ export * from './ya/YaUser';
|
|
|
10
10
|
export * from './ya/YaAuth';
|
|
11
11
|
export * from './ma/MaAuth';
|
|
12
12
|
export * from './ma/MaUser';
|
|
13
|
+
export * from './tg/TgUser';
|
|
14
|
+
export * from './tg/TgAuth';
|
|
15
|
+
export * from './tg/TgApiLoader';
|
|
13
16
|
export * from './keycloak/KeycloakAuth';
|
|
14
17
|
export * from './keycloak/KeycloakUser';
|
|
15
18
|
export * from './external/browser';
|
package/cjs/public-api.js
CHANGED
|
@@ -26,6 +26,9 @@ __exportStar(require("./ya/YaUser"), exports);
|
|
|
26
26
|
__exportStar(require("./ya/YaAuth"), exports);
|
|
27
27
|
__exportStar(require("./ma/MaAuth"), exports);
|
|
28
28
|
__exportStar(require("./ma/MaUser"), exports);
|
|
29
|
+
__exportStar(require("./tg/TgUser"), exports);
|
|
30
|
+
__exportStar(require("./tg/TgAuth"), exports);
|
|
31
|
+
__exportStar(require("./tg/TgApiLoader"), exports);
|
|
29
32
|
__exportStar(require("./keycloak/KeycloakAuth"), exports);
|
|
30
33
|
__exportStar(require("./keycloak/KeycloakUser"), exports);
|
|
31
34
|
__exportStar(require("./external/browser"), exports);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Destroyable } from "@ts-core/common";
|
|
2
|
+
export declare class TgApiLoader extends Destroyable implements ITgApiLoader {
|
|
3
|
+
protected settings: ITgApiLoaderSettings;
|
|
4
|
+
constructor(settings: ITgApiLoaderSettings);
|
|
5
|
+
getApi(): Promise<any>;
|
|
6
|
+
}
|
|
7
|
+
export interface ITgApiLoaderSettings {
|
|
8
|
+
script: IScriptLoader;
|
|
9
|
+
window?: Window;
|
|
10
|
+
}
|
|
11
|
+
export interface ITgApiLoader {
|
|
12
|
+
getApi(): Promise<any>;
|
|
13
|
+
}
|
|
14
|
+
export interface IScriptLoader {
|
|
15
|
+
load(): Promise<void>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.TgApiLoader = void 0;
|
|
13
|
+
const common_1 = require("@ts-core/common");
|
|
14
|
+
const _ = require("lodash");
|
|
15
|
+
class TgApiLoader extends common_1.Destroyable {
|
|
16
|
+
constructor(settings) {
|
|
17
|
+
super();
|
|
18
|
+
this.settings = settings;
|
|
19
|
+
}
|
|
20
|
+
getApi() {
|
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
yield this.settings.script.load();
|
|
23
|
+
let item = !_.isNil(this.settings.window) ? this.settings.window : window;
|
|
24
|
+
return item['Telegram'];
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.TgApiLoader = TgApiLoader;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ExtendedError, ILogger, LoggerWrapper, PromiseHandler } from "@ts-core/common";
|
|
2
|
+
import { TgUser } from "./TgUser";
|
|
3
|
+
import { ITgApiLoader } from "./TgApiLoader";
|
|
4
|
+
export declare class TgAuth extends LoggerWrapper {
|
|
5
|
+
protected promise: PromiseHandler<TgUser, ExtendedError>;
|
|
6
|
+
protected settings: ITgAuthSettings;
|
|
7
|
+
constructor(logger: ILogger, settings: ITgAuthSettings);
|
|
8
|
+
getUser(): Promise<TgUser>;
|
|
9
|
+
destroy(): void;
|
|
10
|
+
}
|
|
11
|
+
export interface ITgAuthSettings {
|
|
12
|
+
api: ITgApiLoader;
|
|
13
|
+
botId: number;
|
|
14
|
+
}
|
package/cjs/tg/TgAuth.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.TgAuth = void 0;
|
|
13
|
+
const common_1 = require("@ts-core/common");
|
|
14
|
+
const TgUser_1 = require("./TgUser");
|
|
15
|
+
const PopUpBase_1 = require("../PopUpBase");
|
|
16
|
+
const _ = require("lodash");
|
|
17
|
+
class TgAuth extends common_1.LoggerWrapper {
|
|
18
|
+
constructor(logger, settings) {
|
|
19
|
+
super(logger);
|
|
20
|
+
this.settings = settings;
|
|
21
|
+
}
|
|
22
|
+
getUser() {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
if (!_.isNil(this.promise)) {
|
|
25
|
+
return this.promise.promise;
|
|
26
|
+
}
|
|
27
|
+
this.promise = common_1.PromiseHandler.create();
|
|
28
|
+
this.settings.api.getApi()
|
|
29
|
+
.then(item => {
|
|
30
|
+
item.Login.auth({ bot_id: this.settings.botId }, item => {
|
|
31
|
+
if (item === false) {
|
|
32
|
+
this.promise.reject(new common_1.ExtendedError(PopUpBase_1.PopUpBase.ERROR_WINDOW_CLOSED, PopUpBase_1.PopUpBase.ERROR_WINDOW_CLOSED));
|
|
33
|
+
this.promise = null;
|
|
34
|
+
}
|
|
35
|
+
let user = new TgUser_1.TgUser();
|
|
36
|
+
user.parse(item);
|
|
37
|
+
this.promise.resolve(user);
|
|
38
|
+
});
|
|
39
|
+
})
|
|
40
|
+
.catch(error => {
|
|
41
|
+
this.promise.reject(new common_1.ExtendedError(error.message));
|
|
42
|
+
this.promise = null;
|
|
43
|
+
});
|
|
44
|
+
return this.promise.promise;
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
destroy() {
|
|
48
|
+
if (this.isDestroyed) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
super.destroy();
|
|
52
|
+
if (!_.isNil(this.promise)) {
|
|
53
|
+
this.promise.reject(new common_1.ExtendedError(PopUpBase_1.PopUpBase.ERROR_WINDOW_CLOSED, PopUpBase_1.PopUpBase.ERROR_WINDOW_CLOSED));
|
|
54
|
+
this.promise = null;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.TgAuth = TgAuth;
|
package/cjs/tg/TgUser.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TgUser = void 0;
|
|
4
|
+
const common_1 = require("@ts-core/common");
|
|
5
|
+
const OAuthUser_1 = require("../OAuthUser");
|
|
6
|
+
class TgUser extends OAuthUser_1.OAuthUser {
|
|
7
|
+
parse(item) {
|
|
8
|
+
this.id = item.id;
|
|
9
|
+
this.hash = item.hash;
|
|
10
|
+
this.name = `${item.first_name} ${item.last_name}`;
|
|
11
|
+
this.date = common_1.DateUtil.getDate(item.auth_date * common_1.DateUtil.MILLISECONDS_SECOND);
|
|
12
|
+
this.picture = item.photo_url;
|
|
13
|
+
this.username = item.username;
|
|
14
|
+
this.telegram = `https://t.me/${item.username}`;
|
|
15
|
+
this.raw = item;
|
|
16
|
+
}
|
|
17
|
+
toCheckString() {
|
|
18
|
+
return Object.keys(this.raw).sort().filter((k) => this.raw[k]).filter((k) => !['hash'].includes(k)).map(k => (`${k}=${this.raw[k]}`)).join('\n');
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.TgUser = TgUser;
|
package/cjs/vk/VkAuth.js
CHANGED
|
@@ -11,9 +11,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.VkAuth = void 0;
|
|
13
13
|
const common_1 = require("@ts-core/common");
|
|
14
|
-
const _ = require("lodash");
|
|
15
14
|
const OAuthBase_1 = require("../OAuthBase");
|
|
16
15
|
const VkUser_1 = require("./VkUser");
|
|
16
|
+
const _ = require("lodash");
|
|
17
17
|
class VkAuth extends OAuthBase_1.OAuthBase {
|
|
18
18
|
constructor(logger, applicationId, window) {
|
|
19
19
|
super(logger, applicationId, window);
|
package/esm/go/GoUser.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { OAuthUser } from "../OAuthUser";
|
|
2
|
+
import * as _ from 'lodash';
|
|
2
3
|
export class GoUser extends OAuthUser {
|
|
3
4
|
parse(item) {
|
|
4
5
|
this.id = item.sub;
|
|
@@ -10,5 +11,16 @@ export class GoUser extends OAuthUser {
|
|
|
10
11
|
this.familyName = item.family_name;
|
|
11
12
|
}
|
|
12
13
|
parsePerson(item) {
|
|
14
|
+
if (!_.isEmpty(item.genders)) {
|
|
15
|
+
this.isMale = _.first(item.genders).value === 'male';
|
|
16
|
+
}
|
|
17
|
+
if (!_.isEmpty(item.birthdays)) {
|
|
18
|
+
for (let value of item.birthdays) {
|
|
19
|
+
if (!_.isNil(value.date) && !_.isNil(value.date.year) && !_.isNil(value.date.month) && !_.isNil(value.date.day)) {
|
|
20
|
+
this.birthday = new Date(value.date.year, value.date.month - 1, value.date.day);
|
|
21
|
+
break;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
13
25
|
}
|
|
14
26
|
}
|
package/esm/public-api.d.ts
CHANGED
|
@@ -10,6 +10,9 @@ export * from './ya/YaUser';
|
|
|
10
10
|
export * from './ya/YaAuth';
|
|
11
11
|
export * from './ma/MaAuth';
|
|
12
12
|
export * from './ma/MaUser';
|
|
13
|
+
export * from './tg/TgUser';
|
|
14
|
+
export * from './tg/TgAuth';
|
|
15
|
+
export * from './tg/TgApiLoader';
|
|
13
16
|
export * from './keycloak/KeycloakAuth';
|
|
14
17
|
export * from './keycloak/KeycloakUser';
|
|
15
18
|
export * from './external/browser';
|
package/esm/public-api.js
CHANGED
|
@@ -10,6 +10,9 @@ export * from './ya/YaUser';
|
|
|
10
10
|
export * from './ya/YaAuth';
|
|
11
11
|
export * from './ma/MaAuth';
|
|
12
12
|
export * from './ma/MaUser';
|
|
13
|
+
export * from './tg/TgUser';
|
|
14
|
+
export * from './tg/TgAuth';
|
|
15
|
+
export * from './tg/TgApiLoader';
|
|
13
16
|
export * from './keycloak/KeycloakAuth';
|
|
14
17
|
export * from './keycloak/KeycloakUser';
|
|
15
18
|
export * from './external/browser';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Destroyable } from "@ts-core/common";
|
|
2
|
+
export declare class TgApiLoader extends Destroyable implements ITgApiLoader {
|
|
3
|
+
protected settings: ITgApiLoaderSettings;
|
|
4
|
+
constructor(settings: ITgApiLoaderSettings);
|
|
5
|
+
getApi(): Promise<any>;
|
|
6
|
+
}
|
|
7
|
+
export interface ITgApiLoaderSettings {
|
|
8
|
+
script: IScriptLoader;
|
|
9
|
+
window?: Window;
|
|
10
|
+
}
|
|
11
|
+
export interface ITgApiLoader {
|
|
12
|
+
getApi(): Promise<any>;
|
|
13
|
+
}
|
|
14
|
+
export interface IScriptLoader {
|
|
15
|
+
load(): Promise<void>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { Destroyable } from "@ts-core/common";
|
|
11
|
+
import * as _ from 'lodash';
|
|
12
|
+
export class TgApiLoader extends Destroyable {
|
|
13
|
+
constructor(settings) {
|
|
14
|
+
super();
|
|
15
|
+
this.settings = settings;
|
|
16
|
+
}
|
|
17
|
+
getApi() {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield this.settings.script.load();
|
|
20
|
+
let item = !_.isNil(this.settings.window) ? this.settings.window : window;
|
|
21
|
+
return item['Telegram'];
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ExtendedError, ILogger, LoggerWrapper, PromiseHandler } from "@ts-core/common";
|
|
2
|
+
import { TgUser } from "./TgUser";
|
|
3
|
+
import { ITgApiLoader } from "./TgApiLoader";
|
|
4
|
+
export declare class TgAuth extends LoggerWrapper {
|
|
5
|
+
protected promise: PromiseHandler<TgUser, ExtendedError>;
|
|
6
|
+
protected settings: ITgAuthSettings;
|
|
7
|
+
constructor(logger: ILogger, settings: ITgAuthSettings);
|
|
8
|
+
getUser(): Promise<TgUser>;
|
|
9
|
+
destroy(): void;
|
|
10
|
+
}
|
|
11
|
+
export interface ITgAuthSettings {
|
|
12
|
+
api: ITgApiLoader;
|
|
13
|
+
botId: number;
|
|
14
|
+
}
|
package/esm/tg/TgAuth.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { ExtendedError, LoggerWrapper, PromiseHandler } from "@ts-core/common";
|
|
11
|
+
import { TgUser } from "./TgUser";
|
|
12
|
+
import { PopUpBase } from "../PopUpBase";
|
|
13
|
+
import * as _ from 'lodash';
|
|
14
|
+
export class TgAuth extends LoggerWrapper {
|
|
15
|
+
constructor(logger, settings) {
|
|
16
|
+
super(logger);
|
|
17
|
+
this.settings = settings;
|
|
18
|
+
}
|
|
19
|
+
getUser() {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
if (!_.isNil(this.promise)) {
|
|
22
|
+
return this.promise.promise;
|
|
23
|
+
}
|
|
24
|
+
this.promise = PromiseHandler.create();
|
|
25
|
+
this.settings.api.getApi()
|
|
26
|
+
.then(item => {
|
|
27
|
+
item.Login.auth({ bot_id: this.settings.botId }, item => {
|
|
28
|
+
if (item === false) {
|
|
29
|
+
this.promise.reject(new ExtendedError(PopUpBase.ERROR_WINDOW_CLOSED, PopUpBase.ERROR_WINDOW_CLOSED));
|
|
30
|
+
this.promise = null;
|
|
31
|
+
}
|
|
32
|
+
let user = new TgUser();
|
|
33
|
+
user.parse(item);
|
|
34
|
+
this.promise.resolve(user);
|
|
35
|
+
});
|
|
36
|
+
})
|
|
37
|
+
.catch(error => {
|
|
38
|
+
this.promise.reject(new ExtendedError(error.message));
|
|
39
|
+
this.promise = null;
|
|
40
|
+
});
|
|
41
|
+
return this.promise.promise;
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
destroy() {
|
|
45
|
+
if (this.isDestroyed) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
super.destroy();
|
|
49
|
+
if (!_.isNil(this.promise)) {
|
|
50
|
+
this.promise.reject(new ExtendedError(PopUpBase.ERROR_WINDOW_CLOSED, PopUpBase.ERROR_WINDOW_CLOSED));
|
|
51
|
+
this.promise = null;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
package/esm/tg/TgUser.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DateUtil } from '@ts-core/common';
|
|
2
|
+
import { OAuthUser } from '../OAuthUser';
|
|
3
|
+
export class TgUser extends OAuthUser {
|
|
4
|
+
parse(item) {
|
|
5
|
+
this.id = item.id;
|
|
6
|
+
this.hash = item.hash;
|
|
7
|
+
this.name = `${item.first_name} ${item.last_name}`;
|
|
8
|
+
this.date = DateUtil.getDate(item.auth_date * DateUtil.MILLISECONDS_SECOND);
|
|
9
|
+
this.picture = item.photo_url;
|
|
10
|
+
this.username = item.username;
|
|
11
|
+
this.telegram = `https://t.me/${item.username}`;
|
|
12
|
+
this.raw = item;
|
|
13
|
+
}
|
|
14
|
+
toCheckString() {
|
|
15
|
+
return Object.keys(this.raw).sort().filter((k) => this.raw[k]).filter((k) => !['hash'].includes(k)).map(k => (`${k}=${this.raw[k]}`)).join('\n');
|
|
16
|
+
}
|
|
17
|
+
}
|
package/esm/vk/VkAuth.js
CHANGED
|
@@ -8,9 +8,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { ExtendedError } from '@ts-core/common';
|
|
11
|
-
import * as _ from 'lodash';
|
|
12
11
|
import { OAuthBase } from "../OAuthBase";
|
|
13
12
|
import { VkUser } from "./VkUser";
|
|
13
|
+
import * as _ from 'lodash';
|
|
14
14
|
export class VkAuth extends OAuthBase {
|
|
15
15
|
constructor(logger, applicationId, window) {
|
|
16
16
|
super(logger, applicationId, window);
|