@edirect/oidc-client 3.1.0 → 3.1.1
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/dist/index.js +9 -24
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,27 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -32,8 +9,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
32
9
|
});
|
|
33
10
|
};
|
|
34
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const client_credentials_1 = require("./grant-type/client_credentials");
|
|
13
|
+
const password_1 = require("./grant-type/password");
|
|
14
|
+
const sso_1 = require("./grant-type/sso");
|
|
15
|
+
const clients = {
|
|
16
|
+
client_credentials: client_credentials_1.oidc,
|
|
17
|
+
password: password_1.oidc,
|
|
18
|
+
sso: sso_1.oidc,
|
|
19
|
+
};
|
|
35
20
|
exports.default = (params) => __awaiter(void 0, void 0, void 0, function* () {
|
|
36
|
-
const
|
|
21
|
+
const oidc = clients[params.grantType];
|
|
37
22
|
yield oidc.connect({
|
|
38
23
|
baseUrl: params.baseUrl,
|
|
39
24
|
oidcPath: params.oidcPath,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAEA,wEAA6E;AAC7E,oDAAyD;AACzD,0CAA+C;AAE/C,MAAM,OAAO,GAAgC;IAC3C,kBAAkB,EAAlB,yBAAkB;IAClB,QAAQ,EAAR,eAAQ;IACR,GAAG,EAAH,UAAG;CACJ,CAAC;AAEF,kBAAe,CAAO,MAAe,EAAoB,EAAE;IACzD,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,SAAmB,CAAC,CAAC;IAEjD,MAAM,IAAI,CAAC,OAAO,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,YAAY,EAAE,MAAM,CAAC,YAAY;KAClC,CAAC,CAAC;IAEH,OAAO,IAAI,CAAC;AACd,CAAC,CAAA,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edirect/oidc-client",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.1",
|
|
4
4
|
"description": "OpenId Connect Client",
|
|
5
5
|
"author": "Bolttech <devs@bolttech.io>",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -36,4 +36,4 @@
|
|
|
36
36
|
"pre-push": "npm run build"
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
}
|
|
39
|
+
}
|