@ts-core/oauth 3.0.30 → 3.0.31
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.
|
@@ -13,7 +13,6 @@ exports.KeycloakAuth = void 0;
|
|
|
13
13
|
const common_1 = require("@ts-core/common");
|
|
14
14
|
const OAuthBase_1 = require("../OAuthBase");
|
|
15
15
|
const KeycloakUser_1 = require("./KeycloakUser");
|
|
16
|
-
const url_1 = require("url");
|
|
17
16
|
const _ = require("lodash");
|
|
18
17
|
class KeycloakAuth extends OAuthBase_1.OAuthBase {
|
|
19
18
|
constructor(logger, settings, window) {
|
|
@@ -39,7 +38,7 @@ class KeycloakAuth extends OAuthBase_1.OAuthBase {
|
|
|
39
38
|
getTokenByCode(dto, secret) {
|
|
40
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41
40
|
let item = yield this.http.call(`${this.getBaseUrl()}/token`, {
|
|
42
|
-
data: new
|
|
41
|
+
data: new URLSearchParams({
|
|
43
42
|
code: dto.codeOrToken,
|
|
44
43
|
client_id: this.applicationId,
|
|
45
44
|
client_secret: secret,
|
|
@@ -10,7 +10,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import { ExtendedError, RandomUtil } from "@ts-core/common";
|
|
11
11
|
import { OAuthBase } from "../OAuthBase";
|
|
12
12
|
import { KeycloakUser } from "./KeycloakUser";
|
|
13
|
-
import { URLSearchParams } from "url";
|
|
14
13
|
import * as _ from 'lodash';
|
|
15
14
|
export class KeycloakAuth extends OAuthBase {
|
|
16
15
|
constructor(logger, settings, window) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ts-core/oauth",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.31",
|
|
4
4
|
"description": "Classes and utils for oauth",
|
|
5
5
|
"main": "./cjs/public-api.js",
|
|
6
6
|
"module": "./esm/public-api.js",
|
|
@@ -19,9 +19,6 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@ts-core/common": "~3.0.14"
|
|
21
21
|
},
|
|
22
|
-
"peerDependencies": {
|
|
23
|
-
"url": "^0.11.0"
|
|
24
|
-
},
|
|
25
22
|
"devDependencies": {
|
|
26
23
|
"@types/node": "^14.14.31",
|
|
27
24
|
"gulp-npm-module-publisher": "^3.0.0"
|