@ts-core/oauth 3.0.20 → 3.0.21
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/external/backend.d.ts +1 -1
- package/cjs/external/backend.js +4 -4
- package/cjs/external/cordova.d.ts +1 -1
- package/cjs/external/cordova.js +3 -3
- package/esm/external/backend.d.ts +1 -1
- package/esm/external/backend.js +2 -2
- package/esm/external/cordova.d.ts +1 -1
- package/esm/external/cordova.js +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { IOAuthPopUpDto, OAuthBase } from '../OAuthBase';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const OAuthBackendPropertiesSet: (item: OAuthBase, redirectUri: string, method: IOAuthBackendMethod, timeout?: number) => void;
|
|
3
3
|
export type IOAuthBackendMethod = (state: string) => Promise<IOAuthPopUpDto>;
|
package/cjs/external/backend.js
CHANGED
|
@@ -9,12 +9,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.OAuthBackendPropertiesSet = void 0;
|
|
13
13
|
const common_1 = require("@ts-core/common");
|
|
14
14
|
const rxjs_1 = require("rxjs");
|
|
15
|
-
const
|
|
15
|
+
const OAuthBackendPropertiesSet = (item, redirectUri, method, timeout = common_1.DateUtil.MILLISECONDS_SECOND) => {
|
|
16
16
|
item.redirectUri = redirectUri;
|
|
17
17
|
item.popUpIsCheckClose = false;
|
|
18
|
-
item.popUpOpened.pipe((0, rxjs_1.delay)(timeout), (0, rxjs_1.takeUntil)(item.destroyed)).subscribe(() => __awaiter(void 0, void 0, void 0, function* () { return item.parsePopUpResult(yield method(item.state)); }));
|
|
18
|
+
item.popUpOpened.pipe((0, rxjs_1.delay)(timeout), (0, rxjs_1.takeUntil)(item.destroyed)).subscribe(() => __awaiter(void 0, void 0, void 0, function* () { return item.parsePopUpResult(yield method.call(this, item.state)); }));
|
|
19
19
|
};
|
|
20
|
-
exports.
|
|
20
|
+
exports.OAuthBackendPropertiesSet = OAuthBackendPropertiesSet;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { OAuthBase } from '../OAuthBase';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const OAuthCordovaPropertiesSet: (item: OAuthBase, packageName: string) => void;
|
package/cjs/external/cordova.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.OAuthCordovaPropertiesSet = void 0;
|
|
4
4
|
const OAuthParser_1 = require("../OAuthParser");
|
|
5
5
|
const _ = require("lodash");
|
|
6
|
-
const
|
|
6
|
+
const OAuthCordovaPropertiesSet = (item, packageName) => {
|
|
7
7
|
item.popUpTarget = 'oauth:cordova';
|
|
8
8
|
item.redirectUri = `${packageName}://oauth_callback`;
|
|
9
9
|
item.popUpIsCheckClose = false;
|
|
10
10
|
item.popUpMessageParser = cordovaPopUpMessageParser;
|
|
11
11
|
};
|
|
12
|
-
exports.
|
|
12
|
+
exports.OAuthCordovaPropertiesSet = OAuthCordovaPropertiesSet;
|
|
13
13
|
function cordovaPopUpMessageParser(event) {
|
|
14
14
|
let data = event.data;
|
|
15
15
|
let prefix = 'oauth::';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { IOAuthPopUpDto, OAuthBase } from '../OAuthBase';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const OAuthBackendPropertiesSet: (item: OAuthBase, redirectUri: string, method: IOAuthBackendMethod, timeout?: number) => void;
|
|
3
3
|
export type IOAuthBackendMethod = (state: string) => Promise<IOAuthPopUpDto>;
|
package/esm/external/backend.js
CHANGED
|
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { DateUtil } from '@ts-core/common';
|
|
11
11
|
import { delay, takeUntil } from 'rxjs';
|
|
12
|
-
export const
|
|
12
|
+
export const OAuthBackendPropertiesSet = (item, redirectUri, method, timeout = DateUtil.MILLISECONDS_SECOND) => {
|
|
13
13
|
item.redirectUri = redirectUri;
|
|
14
14
|
item.popUpIsCheckClose = false;
|
|
15
|
-
item.popUpOpened.pipe(delay(timeout), takeUntil(item.destroyed)).subscribe(() => __awaiter(void 0, void 0, void 0, function* () { return item.parsePopUpResult(yield method(item.state)); }));
|
|
15
|
+
item.popUpOpened.pipe(delay(timeout), takeUntil(item.destroyed)).subscribe(() => __awaiter(void 0, void 0, void 0, function* () { return item.parsePopUpResult(yield method.call(this, item.state)); }));
|
|
16
16
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { OAuthBase } from '../OAuthBase';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const OAuthCordovaPropertiesSet: (item: OAuthBase, packageName: string) => void;
|
package/esm/external/cordova.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OAuthParser } from '../OAuthParser';
|
|
2
2
|
import * as _ from 'lodash';
|
|
3
|
-
export const
|
|
3
|
+
export const OAuthCordovaPropertiesSet = (item, packageName) => {
|
|
4
4
|
item.popUpTarget = 'oauth:cordova';
|
|
5
5
|
item.redirectUri = `${packageName}://oauth_callback`;
|
|
6
6
|
item.popUpIsCheckClose = false;
|