@dvelop-sdk/identityprovider 2.1.6 → 3.0.2

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.
Files changed (51) hide show
  1. package/README.md +1 -1
  2. package/lib/authentication/get-auth-session/get-auth-session.d.ts +21 -14
  3. package/lib/authentication/get-auth-session/get-auth-session.d.ts.map +1 -1
  4. package/lib/authentication/get-auth-session/get-auth-session.js +52 -48
  5. package/lib/authentication/get-auth-session/get-auth-session.js.map +1 -1
  6. package/lib/authentication/get-impersonated-auth-session-id/get-impersonated-auth-session-id.d.ts +21 -10
  7. package/lib/authentication/get-impersonated-auth-session-id/get-impersonated-auth-session-id.d.ts.map +1 -1
  8. package/lib/authentication/get-impersonated-auth-session-id/get-impersonated-auth-session-id.js +53 -50
  9. package/lib/authentication/get-impersonated-auth-session-id/get-impersonated-auth-session-id.js.map +1 -1
  10. package/lib/authentication/get-login-redirection-uri/get-login-redirection-uri.d.ts +4 -6
  11. package/lib/authentication/get-login-redirection-uri/get-login-redirection-uri.d.ts.map +1 -1
  12. package/lib/authentication/get-login-redirection-uri/get-login-redirection-uri.js +4 -6
  13. package/lib/authentication/get-login-redirection-uri/get-login-redirection-uri.js.map +1 -1
  14. package/lib/authentication/request-app-session/request-app-session.d.ts +40 -10
  15. package/lib/authentication/request-app-session/request-app-session.d.ts.map +1 -1
  16. package/lib/authentication/request-app-session/request-app-session.js +46 -40
  17. package/lib/authentication/request-app-session/request-app-session.js.map +1 -1
  18. package/lib/authentication/validate-app-session-signature/validate-app-session-signature.d.ts +15 -15
  19. package/lib/authentication/validate-app-session-signature/validate-app-session-signature.d.ts.map +1 -1
  20. package/lib/authentication/validate-app-session-signature/validate-app-session-signature.js +41 -20
  21. package/lib/authentication/validate-app-session-signature/validate-app-session-signature.js.map +1 -1
  22. package/lib/authentication/validate-auth-session-id/validate-auth-session-id.d.ts +48 -11
  23. package/lib/authentication/validate-auth-session-id/validate-auth-session-id.d.ts.map +1 -1
  24. package/lib/authentication/validate-auth-session-id/validate-auth-session-id.js +47 -48
  25. package/lib/authentication/validate-auth-session-id/validate-auth-session-id.js.map +1 -1
  26. package/lib/index.d.ts +32 -7
  27. package/lib/index.d.ts.map +1 -1
  28. package/lib/index.js +38 -19
  29. package/lib/index.js.map +1 -1
  30. package/lib/internal.d.ts +6 -0
  31. package/lib/internal.d.ts.map +1 -0
  32. package/lib/internal.js +19 -0
  33. package/lib/internal.js.map +1 -0
  34. package/lib/utils/http.d.ts +12 -0
  35. package/lib/utils/http.d.ts.map +1 -0
  36. package/lib/utils/http.js +130 -0
  37. package/lib/utils/http.js.map +1 -0
  38. package/package.json +3 -5
  39. package/LICENSE +0 -201
  40. package/lib/authentication/get-auth-session/auth-session.d.ts +0 -15
  41. package/lib/authentication/get-auth-session/auth-session.d.ts.map +0 -1
  42. package/lib/authentication/get-auth-session/auth-session.js +0 -3
  43. package/lib/authentication/get-auth-session/auth-session.js.map +0 -1
  44. package/lib/authentication/validate-auth-session-id/scim-user.d.ts +0 -32
  45. package/lib/authentication/validate-auth-session-id/scim-user.d.ts.map +0 -1
  46. package/lib/authentication/validate-auth-session-id/scim-user.js +0 -3
  47. package/lib/authentication/validate-auth-session-id/scim-user.js.map +0 -1
  48. package/lib/errors.d.ts +0 -33
  49. package/lib/errors.d.ts.map +0 -1
  50. package/lib/errors.js +0 -82
  51. package/lib/errors.js.map +0 -1
@@ -1,24 +1,24 @@
1
+ import { AppSession } from "../request-app-session/request-app-session";
1
2
  /**
2
- * Validate the sign value which is provided when an appSession is sent. For further information on this process refer to the [documentation](https://developer.d-velop.de/documentation/idpapi/en/identityprovider-app-201523580.html#IdentityproviderApp-Inter-appcommunicationwithappsessions).
3
- *
4
- * @param {string} appName App that requested the appSession
5
- * @param {string} requestId The requestId that was sent when requesting an appSession
6
- * @param {string} authSessionId The authSessionId provided to your callback
7
- * @param {string} expire The expire value provided to your callback
8
- * @param {string} sign The sign value provided to your callback
9
- * @throws {@link InvalidAppSessionSignatureError} indicates that the sign value is not valid
10
- *
11
- * @category Authentication
3
+ * Indicates an invalid sign-value
4
+ * @category Error
5
+ */
6
+ export declare class InvalidAppSessionSignatureError extends Error {
7
+ constructor();
8
+ }
9
+ /**
10
+ * Validate the sign value which is provided when an appSession is sent to your app. For further information on this process refer to the [documentation](https://developer.d-velop.de/documentation/idpapi/en/identityprovider-app-201523580.html#IdentityproviderApp-Inter-appcommunicationwithappsessions).
12
11
  *
13
- * @example ```typescript
14
- * acceptPostRequest(req: Request, res: Respone) {
12
+ * ```typescript
15
13
  * try {
16
- * validateAppSessionSignature("acme-app", "requestIdUsedOnAppSessionRequest", req.body.authSessionId, req.body.expire, req.body.sign); //pass or error
14
+ * validateAppSessionSignature("cda-compliance", "qP-7GNoDJ5c", requestBody); //pass or error
17
15
  * } catch(e) {
18
- * res.send("Forbidden");
16
+ * // respond with 403 - Forbidden
19
17
  * }
20
18
  * }
21
19
  * ```
20
+ * @throws {@link InvalidAppSessionSignatureError} indicates that the sign-value is not valid
21
+ * @category Authentication
22
22
  */
23
- export declare function validateAppSessionSignature(appName: string, requestId: string, authSessionId: string, expire: string, sign: string): void;
23
+ export declare function validateAppSessionSignature(appName: string, requestId: string, appSession: AppSession): void;
24
24
  //# sourceMappingURL=validate-app-session-signature.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"validate-app-session-signature.d.ts","sourceRoot":"","sources":["../../../src/authentication/validate-app-session-signature/validate-app-session-signature.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAKzI"}
1
+ {"version":3,"file":"validate-app-session-signature.d.ts","sourceRoot":"","sources":["../../../src/authentication/validate-app-session-signature/validate-app-session-signature.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAC;AAExE;;;EAGE;AACF,qBAAa,+BAAgC,SAAQ,KAAK;;CAMzD;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,GAAG,IAAI,CAK5G"}
@@ -1,34 +1,55 @@
1
1
  "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
2
17
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.validateAppSessionSignature = void 0;
18
+ exports.validateAppSessionSignature = exports.InvalidAppSessionSignatureError = void 0;
4
19
  var crypto_1 = require("crypto");
5
- var index_1 = require("../../index");
6
20
  /**
7
- * Validate the sign value which is provided when an appSession is sent. For further information on this process refer to the [documentation](https://developer.d-velop.de/documentation/idpapi/en/identityprovider-app-201523580.html#IdentityproviderApp-Inter-appcommunicationwithappsessions).
8
- *
9
- * @param {string} appName App that requested the appSession
10
- * @param {string} requestId The requestId that was sent when requesting an appSession
11
- * @param {string} authSessionId The authSessionId provided to your callback
12
- * @param {string} expire The expire value provided to your callback
13
- * @param {string} sign The sign value provided to your callback
14
- * @throws {@link InvalidAppSessionSignatureError} indicates that the sign value is not valid
15
- *
16
- * @category Authentication
21
+ * Indicates an invalid sign-value
22
+ * @category Error
23
+ */
24
+ var InvalidAppSessionSignatureError = /** @class */ (function (_super) {
25
+ __extends(InvalidAppSessionSignatureError, _super);
26
+ // eslint-disable-next-line no-unused-vars
27
+ function InvalidAppSessionSignatureError() {
28
+ var _this = _super.call(this, "Invalid AppSessionSingature: An AppSession was sent that contains no valid signature.") || this;
29
+ Object.setPrototypeOf(_this, InvalidAppSessionSignatureError.prototype);
30
+ return _this;
31
+ }
32
+ return InvalidAppSessionSignatureError;
33
+ }(Error));
34
+ exports.InvalidAppSessionSignatureError = InvalidAppSessionSignatureError;
35
+ /**
36
+ * Validate the sign value which is provided when an appSession is sent to your app. For further information on this process refer to the [documentation](https://developer.d-velop.de/documentation/idpapi/en/identityprovider-app-201523580.html#IdentityproviderApp-Inter-appcommunicationwithappsessions).
17
37
  *
18
- * @example ```typescript
19
- * acceptPostRequest(req: Request, res: Respone) {
38
+ * ```typescript
20
39
  * try {
21
- * validateAppSessionSignature("acme-app", "requestIdUsedOnAppSessionRequest", req.body.authSessionId, req.body.expire, req.body.sign); //pass or error
40
+ * validateAppSessionSignature("cda-compliance", "qP-7GNoDJ5c", requestBody); //pass or error
22
41
  * } catch(e) {
23
- * res.send("Forbidden");
42
+ * // respond with 403 - Forbidden
24
43
  * }
25
44
  * }
26
45
  * ```
46
+ * @throws {@link InvalidAppSessionSignatureError} indicates that the sign-value is not valid
47
+ * @category Authentication
27
48
  */
28
- function validateAppSessionSignature(appName, requestId, authSessionId, expire, sign) {
29
- var expectedSign = crypto_1.createHash("sha256").update(appName + authSessionId + expire + requestId, "utf8").digest("hex");
30
- if (expectedSign !== sign) {
31
- throw new index_1.InvalidAppSessionSignatureError();
49
+ function validateAppSessionSignature(appName, requestId, appSession) {
50
+ var expectedSign = crypto_1.createHash("sha256").update(appName + appSession.appSessionId + appSession.expire + requestId, "utf8").digest("hex");
51
+ if (expectedSign !== appSession.sign) {
52
+ throw new InvalidAppSessionSignatureError();
32
53
  }
33
54
  }
34
55
  exports.validateAppSessionSignature = validateAppSessionSignature;
@@ -1 +1 @@
1
- {"version":3,"file":"validate-app-session-signature.js","sourceRoot":"","sources":["../../../src/authentication/validate-app-session-signature/validate-app-session-signature.ts"],"names":[],"mappings":";;;AAAA,iCAAoC;AACpC,qCAA8D;AAE9D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,SAAgB,2BAA2B,CAAC,OAAe,EAAE,SAAiB,EAAE,aAAqB,EAAE,MAAc,EAAE,IAAY;IACjI,IAAM,YAAY,GAAW,mBAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,GAAG,aAAa,GAAG,MAAM,GAAG,SAAS,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC7H,IAAI,YAAY,KAAK,IAAI,EAAE;QACzB,MAAM,IAAI,uCAA+B,EAAE,CAAC;KAC7C;AACH,CAAC;AALD,kEAKC"}
1
+ {"version":3,"file":"validate-app-session-signature.js","sourceRoot":"","sources":["../../../src/authentication/validate-app-session-signature/validate-app-session-signature.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,iCAAoC;AAGpC;;;EAGE;AACF;IAAqD,mDAAK;IACxD,0CAA0C;IAC1C;QAAA,YACE,kBAAM,uFAAuF,CAAC,SAE/F;QADC,MAAM,CAAC,cAAc,CAAC,KAAI,EAAE,+BAA+B,CAAC,SAAS,CAAC,CAAC;;IACzE,CAAC;IACH,sCAAC;AAAD,CAAC,AAND,CAAqD,KAAK,GAMzD;AANY,0EAA+B;AAQ5C;;;;;;;;;;;;;GAaG;AACH,SAAgB,2BAA2B,CAAC,OAAe,EAAE,SAAiB,EAAE,UAAsB;IACpG,IAAM,YAAY,GAAW,mBAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,GAAG,UAAU,CAAC,YAAY,GAAG,UAAU,CAAC,MAAM,GAAG,SAAS,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAClJ,IAAI,YAAY,KAAK,UAAU,CAAC,IAAI,EAAE;QACpC,MAAM,IAAI,+BAA+B,EAAE,CAAC;KAC7C;AACH,CAAC;AALD,kEAKC"}
@@ -1,19 +1,56 @@
1
- import { ScimUser } from "../../index";
1
+ import { DvelopContext } from "../../../../core/lib";
2
+ import { HttpConfig, HttpResponse } from "../../utils/http";
2
3
  /**
3
- * Validates an AuthSessionId and returns a [ScimUser]{@link ScimUser}
4
+ * User representation according to the [System for Cross-domain Identity Management (SCIM)]{@link https://tools.ietf.org/html/rfc7644}.
5
+ * @category Authentication
6
+ */
7
+ export interface DvelopUser {
8
+ /** Unique UserId */
9
+ id?: string;
10
+ /** Technical username */
11
+ userName?: string;
12
+ /** Name object containg family name and given name */
13
+ name?: {
14
+ familyName?: string;
15
+ givenName?: string;
16
+ };
17
+ /** Display name assigned by the administrators */
18
+ displayName?: string;
19
+ /** E-Mail addesses */
20
+ emails?: {
21
+ value?: string;
22
+ }[];
23
+ /** Groups assigned to the user */
24
+ groups?: {
25
+ value?: string;
26
+ display?: string;
27
+ }[];
28
+ /** Photos for the user usually provided by URL in value */
29
+ photos?: {
30
+ value?: string;
31
+ type?: string;
32
+ }[];
33
+ }
34
+ /**
35
+ * Factory for the {@link validateAuthSessionId}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
36
+ * @typeparam T Return type of the {@link validateAuthSessionId}-function. A corresponding transformFuntion has to be supplied.
37
+ * @category Authentication
38
+ */
39
+ export declare function _validateAuthSessionIdFactory<T>(httpRequestFunction: (context: DvelopContext, config: HttpConfig) => Promise<HttpResponse>, transformFunction: (response: HttpResponse, context: DvelopContext) => T): (context: DvelopContext) => Promise<T>;
40
+ /**
41
+ * Validates an AuthSessionId and returns a {@link DvelopUser}.
4
42
  *
5
- * @param {string} systemBaseUri SystemBaseUri for the tenant
6
- * @param {string} authSessionId AuthSessionId which should be validated
7
- * @throws {@link UnauthorizedError} indicates an invalid authSessionId or no authSessionId was sent.
8
- * @throws {@link ForbiddenError} indicates that a valid authSessionId for an external user was sent but external validation was set to false.
9
- * @throws {@link NotFoundError} indicates that a valid token for a deleted user was sent.
43
+ * ```typescript
44
+ * import { validateAuthSessionId } from "@dvelop-sdk/identityprovider";
10
45
  *
11
- * @category Authentication
46
+ * const user: DvelopUser = await validateAuthSessionId({
47
+ * systemBaseUri: "https://monster-ag.d-velop.cloud",
48
+ * authSessionId: "dQw4w9WgXcQ"
49
+ * });
12
50
  *
13
- * @example ```typescript
14
- * const user: ScimUser = await validateAuthSessionId("https://monster-ag.d-velop.cloud", "vXo4FMlnYYiGArNfjfJHEJDNWfjfejglgnewjgrjokgajifahfhdahfuewfhlR/4FxJxmNsjlq2XgWQm/GYVBq/hEvsJy1BK4WLoCXek=&ga8gds7gafkajgkj24ut8ugudash34jGlDG&dr6j0zusHVN8PcyerI0YXqRu30f8AGoUaZ6vInCDtZInS6aK2PplAelsv9t8");
15
51
  * console.log(user.displayName) //Mike Glotzkowski
16
52
  * ```
53
+ * @category Authentication
17
54
  */
18
- export declare function validateAuthSessionId(systemBaseUri: string, authSessionId: string): Promise<ScimUser>;
55
+ export declare function validateAuthSessionId(context: DvelopContext): Promise<DvelopUser>;
19
56
  //# sourceMappingURL=validate-auth-session-id.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"validate-auth-session-id.d.ts","sourceRoot":"","sources":["../../../src/authentication/validate-auth-session-id/validate-auth-session-id.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAoD,MAAM,aAAa,CAAC;AAEzF;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,qBAAqB,CAAC,aAAa,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CA4B3G"}
1
+ {"version":3,"file":"validate-auth-session-id.d.ts","sourceRoot":"","sources":["../../../src/authentication/validate-auth-session-id/validate-auth-session-id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,YAAY,EAA+B,MAAM,kBAAkB,CAAC;AAEzF;;;GAGG;AACH,MAAM,WAAW,UAAU;IAEzB,oBAAoB;IACpB,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,yBAAyB;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,sDAAsD;IACtD,IAAI,CAAC,EAAE;QACL,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IAEF,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,sBAAsB;IACtB,MAAM,CAAC,EAAE;QACP,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,EAAE,CAAC;IAEJ,kCAAkC;IAClC,MAAM,CAAC,EAAE;QACP,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,EAAE,CAAC;IAEJ,2DAA2D;IAC3D,MAAM,CAAC,EAAE;QACP,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;CACL;AAWD;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,CAAC,EAC7C,mBAAmB,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,KAAK,OAAO,CAAC,YAAY,CAAC,EAC1F,iBAAiB,EAAE,CAAC,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,aAAa,KAAK,CAAC,GACvE,CAAC,OAAO,EAAE,aAAa,KAAK,OAAO,CAAC,CAAC,CAAC,CASxC;AAED;;;;;;;;;;;;;;GAcG;AAEH,wBAAsB,qBAAqB,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC,CAEvF"}
@@ -35,65 +35,64 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
35
35
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
36
  }
37
37
  };
38
- var __importDefault = (this && this.__importDefault) || function (mod) {
39
- return (mod && mod.__esModule) ? mod : { "default": mod };
40
- };
41
38
  Object.defineProperty(exports, "__esModule", { value: true });
42
- exports.validateAuthSessionId = void 0;
43
- var axios_1 = __importDefault(require("axios"));
44
- var index_1 = require("../../index");
39
+ exports.validateAuthSessionId = exports._validateAuthSessionIdFactory = exports._validateAuthSessionIdDefaultTransformFunction = void 0;
40
+ var http_1 = require("../../utils/http");
41
+ /**
42
+ * Default transform-function provided to the {@link validateAuthSessionId}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
43
+ * @internal
44
+ * @category Authentication
45
+ */
46
+ function _validateAuthSessionIdDefaultTransformFunction(response, _) {
47
+ return response.data;
48
+ }
49
+ exports._validateAuthSessionIdDefaultTransformFunction = _validateAuthSessionIdDefaultTransformFunction;
45
50
  /**
46
- * Validates an AuthSessionId and returns a [ScimUser]{@link ScimUser}
51
+ * Factory for the {@link validateAuthSessionId}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
52
+ * @typeparam T Return type of the {@link validateAuthSessionId}-function. A corresponding transformFuntion has to be supplied.
53
+ * @category Authentication
54
+ */
55
+ function _validateAuthSessionIdFactory(httpRequestFunction, transformFunction) {
56
+ var _this = this;
57
+ return function (context) { return __awaiter(_this, void 0, void 0, function () {
58
+ var response;
59
+ return __generator(this, function (_a) {
60
+ switch (_a.label) {
61
+ case 0: return [4 /*yield*/, httpRequestFunction(context, {
62
+ method: "GET",
63
+ url: "/identityprovider",
64
+ follows: ["validate"]
65
+ })];
66
+ case 1:
67
+ response = _a.sent();
68
+ return [2 /*return*/, transformFunction(response, context)];
69
+ }
70
+ });
71
+ }); };
72
+ }
73
+ exports._validateAuthSessionIdFactory = _validateAuthSessionIdFactory;
74
+ /**
75
+ * Validates an AuthSessionId and returns a {@link DvelopUser}.
47
76
  *
48
- * @param {string} systemBaseUri SystemBaseUri for the tenant
49
- * @param {string} authSessionId AuthSessionId which should be validated
50
- * @throws {@link UnauthorizedError} indicates an invalid authSessionId or no authSessionId was sent.
51
- * @throws {@link ForbiddenError} indicates that a valid authSessionId for an external user was sent but external validation was set to false.
52
- * @throws {@link NotFoundError} indicates that a valid token for a deleted user was sent.
77
+ * ```typescript
78
+ * import { validateAuthSessionId } from "@dvelop-sdk/identityprovider";
53
79
  *
54
- * @category Authentication
80
+ * const user: DvelopUser = await validateAuthSessionId({
81
+ * systemBaseUri: "https://monster-ag.d-velop.cloud",
82
+ * authSessionId: "dQw4w9WgXcQ"
83
+ * });
55
84
  *
56
- * @example ```typescript
57
- * const user: ScimUser = await validateAuthSessionId("https://monster-ag.d-velop.cloud", "vXo4FMlnYYiGArNfjfJHEJDNWfjfejglgnewjgrjokgajifahfhdahfuewfhlR/4FxJxmNsjlq2XgWQm/GYVBq/hEvsJy1BK4WLoCXek=&ga8gds7gafkajgkj24ut8ugudash34jGlDG&dr6j0zusHVN8PcyerI0YXqRu30f8AGoUaZ6vInCDtZInS6aK2PplAelsv9t8");
58
85
  * console.log(user.displayName) //Mike Glotzkowski
59
86
  * ```
87
+ * @category Authentication
60
88
  */
61
- function validateAuthSessionId(systemBaseUri, authSessionId) {
89
+ /* istanbul ignore next */
90
+ function validateAuthSessionId(context) {
62
91
  return __awaiter(this, void 0, void 0, function () {
63
- var errorContext, response, e_1;
64
92
  return __generator(this, function (_a) {
65
93
  switch (_a.label) {
66
- case 0:
67
- errorContext = "Failed to validate authSessionId";
68
- _a.label = 1;
69
- case 1:
70
- _a.trys.push([1, 3, , 4]);
71
- return [4 /*yield*/, axios_1.default.get("/identityprovider", {
72
- baseURL: systemBaseUri,
73
- headers: {
74
- "Authorization": "Bearer " + authSessionId,
75
- "Content-Type": "application/json"
76
- },
77
- follows: ["validate"]
78
- })];
79
- case 2:
80
- response = _a.sent();
81
- return [2 /*return*/, response.data];
82
- case 3:
83
- e_1 = _a.sent();
84
- if (e_1.response) {
85
- switch (e_1.response.status) {
86
- case 401:
87
- throw new index_1.UnauthorizedError(errorContext, e_1.response);
88
- case 403:
89
- throw new index_1.ForbiddenError(errorContext, e_1.response);
90
- case 404:
91
- throw new index_1.NotFoundError(errorContext, e_1.response);
92
- }
93
- }
94
- e_1.message = errorContext + ": " + e_1.message;
95
- throw e_1;
96
- case 4: return [2 /*return*/];
94
+ case 0: return [4 /*yield*/, _validateAuthSessionIdFactory(http_1._defaultHttpRequestFunction, _validateAuthSessionIdDefaultTransformFunction)(context)];
95
+ case 1: return [2 /*return*/, _a.sent()];
97
96
  }
98
97
  });
99
98
  });
@@ -1 +1 @@
1
- {"version":3,"file":"validate-auth-session-id.js","sourceRoot":"","sources":["../../../src/authentication/validate-auth-session-id/validate-auth-session-id.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA6C;AAC7C,qCAAyF;AAEzF;;;;;;;;;;;;;;;GAeG;AACH,SAAsB,qBAAqB,CAAC,aAAqB,EAAE,aAAqB;;;;;;oBAEhF,YAAY,GAAW,kCAAkC,CAAC;;;;oBAGpB,qBAAM,eAAK,CAAC,GAAG,CAAW,mBAAmB,EAAE;4BACvF,OAAO,EAAE,aAAa;4BACtB,OAAO,EAAE;gCACP,eAAe,EAAE,YAAU,aAAe;gCAC1C,cAAc,EAAE,kBAAkB;6BACnC;4BACD,OAAO,EAAE,CAAC,UAAU,CAAC;yBACtB,CAAC,EAAA;;oBAPI,QAAQ,GAA4B,SAOxC;oBACF,sBAAO,QAAQ,CAAC,IAAI,EAAC;;;oBAErB,IAAI,GAAC,CAAC,QAAQ,EAAE;wBACd,QAAQ,GAAC,CAAC,QAAQ,CAAC,MAAM,EAAE;4BAC3B,KAAK,GAAG;gCACN,MAAM,IAAI,yBAAiB,CAAC,YAAY,EAAE,GAAC,CAAC,QAAQ,CAAC,CAAC;4BACxD,KAAK,GAAG;gCACN,MAAM,IAAI,sBAAc,CAAC,YAAY,EAAE,GAAC,CAAC,QAAQ,CAAC,CAAC;4BACrD,KAAK,GAAG;gCACN,MAAM,IAAI,qBAAa,CAAC,YAAY,EAAE,GAAC,CAAC,QAAQ,CAAC,CAAC;yBACnD;qBACF;oBACD,GAAC,CAAC,OAAO,GAAM,YAAY,UAAK,GAAC,CAAC,OAAS,CAAC;oBAC5C,MAAM,GAAC,CAAC;;;;;CAEX;AA5BD,sDA4BC"}
1
+ {"version":3,"file":"validate-auth-session-id.js","sourceRoot":"","sources":["../../../src/authentication/validate-auth-session-id/validate-auth-session-id.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,yCAAyF;AAyCzF;;;;GAIG;AACH,SAAgB,8CAA8C,CAAC,QAAsB,EAAE,CAAgB;IACrG,OAAO,QAAQ,CAAC,IAAI,CAAC;AACvB,CAAC;AAFD,wGAEC;AAED;;;;GAIG;AACH,SAAgB,6BAA6B,CAC3C,mBAA0F,EAC1F,iBAAwE;IAF1E,iBAYC;IARC,OAAO,UAAO,OAAsB;;;;wBACH,qBAAM,mBAAmB,CAAC,OAAO,EAAE;wBAChE,MAAM,EAAE,KAAK;wBACb,GAAG,EAAE,mBAAmB;wBACxB,OAAO,EAAE,CAAC,UAAU,CAAC;qBACtB,CAAC,EAAA;;oBAJI,QAAQ,GAAiB,SAI7B;oBACF,sBAAO,iBAAiB,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAC;;;SAC7C,CAAC;AACJ,CAAC;AAZD,sEAYC;AAED;;;;;;;;;;;;;;GAcG;AACH,0BAA0B;AAC1B,SAAsB,qBAAqB,CAAC,OAAsB;;;;wBACzD,qBAAM,6BAA6B,CAAC,kCAA2B,EAAE,8CAA8C,CAAC,CAAC,OAAO,CAAC,EAAA;wBAAhI,sBAAO,SAAyH,EAAC;;;;CAClI;AAFD,sDAEC"}
package/lib/index.d.ts CHANGED
@@ -1,10 +1,35 @@
1
- export { UnauthorizedError, ForbiddenError, NotFoundError, InvalidAppSessionSignatureError } from "./errors";
2
- export { AuthSession } from "./authentication/get-auth-session/auth-session";
1
+ /**
2
+ <div align="center">
3
+ <h1>@dvelop-sdk/identityprovider</h1>
4
+ <a href="https://www.npmjs.com/package/@dvelop-sdk/identityprovider">
5
+ <img alt="npm (scoped)" src="https://img.shields.io/npm/v/@dvelop-sdk/identityprovider?style=for-the-badge">
6
+ </a>
7
+ <a href="https://www.npmjs.com/package/@dvelop-sdk/identityprovider">
8
+ <img alt="npm bundle size (scoped)" src="https://img.shields.io/bundlephobia/min/@dvelop-sdk/identityprovider?style=for-the-badge">
9
+ </a>
10
+ <a href="https://github.com/d-velop/dvelop-sdk-node">
11
+ <img alt="GitHub" src="https://img.shields.io/badge/GitHub-dvelop--sdk--node-%23ff0844?logo=github&style=for-the-badge">
12
+ </a>
13
+ <a href="https://github.com/d-velop/dvelop-sdk-node/blob/master/LICENSE">
14
+ <img alt="license" src="https://img.shields.io/github/license/d-velop/dvelop-sdk-node?style=for-the-badge">
15
+ </a
16
+ </br>
17
+ <p>This package contains functionality for the <a href="https://developer.d-velop.de/documentation/idpapi/en/identityprovider-app-201523580.html">Identityprovider-App</a> in the d.velop cloud.</p>
18
+ <a href="https://d-velop.github.io/dvelop-sdk-node/modules/identityprovider.html"><strong>Explore the docs »</strong></a>
19
+ </br>
20
+ <a href="https://www.npmjs.com/package/@dvelop-sdk/identityprovider"><strong>Install via npm »</strong></a>
21
+ </br>
22
+ <a href="https://github.com/d-velop/dvelop-sdk-node"><strong>Check us out on GitHub »</strong></a>
23
+ </div>
24
+ * @module identityprovider
25
+ */
26
+ export { DvelopContext, BadInputError, UnauthorizedError, ForbiddenError, NotFoundError } from "@dvelop-sdk/core";
27
+ export { IdentityproviderError } from "./utils/http";
28
+ export * as internals from "./internal";
3
29
  export { getAuthSession } from "./authentication/get-auth-session/get-auth-session";
4
- export { ScimUser } from "./authentication/validate-auth-session-id/scim-user";
5
- export { validateAuthSessionId } from "./authentication/validate-auth-session-id/validate-auth-session-id";
30
+ export { GetImpersonatedAuthSessionIdParams, getImpersonatedAuthSessionId } from "./authentication/get-impersonated-auth-session-id/get-impersonated-auth-session-id";
31
+ export { RequestAppSessionParams, requestAppSession, AppSession } from "./authentication/request-app-session/request-app-session";
6
32
  export { getLoginRedirectionUri } from "./authentication/get-login-redirection-uri/get-login-redirection-uri";
7
- export { requestAppSession } from "./authentication/request-app-session/request-app-session";
8
- export { validateAppSessionSignature } from "./authentication/validate-app-session-signature/validate-app-session-signature";
9
- export { getImpersonatedAuthSessionId } from "./authentication/get-impersonated-auth-session-id/get-impersonated-auth-session-id";
33
+ export { validateAppSessionSignature, InvalidAppSessionSignatureError } from "./authentication/validate-app-session-signature/validate-app-session-signature";
34
+ export { validateAuthSessionId, DvelopUser } from "./authentication/validate-auth-session-id/validate-auth-session-id";
10
35
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA6BA,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,aAAa,EAAE,+BAA+B,EAAE,MAAM,UAAU,CAAC;AAC7G,OAAO,EAAE,WAAW,EAAE,MAAM,gDAAgD,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,oDAAoD,CAAC;AACpF,OAAO,EAAE,QAAQ,EAAE,MAAM,qDAAqD,CAAC;AAC/E,OAAO,EAAE,qBAAqB,EAAE,MAAM,oEAAoE,CAAC;AAC3G,OAAO,EAAE,sBAAsB,EAAE,MAAM,sEAAsE,CAAC;AAC9G,OAAO,EAAE,iBAAiB,EAAE,MAAM,0DAA0D,CAAC;AAC7F,OAAO,EAAE,2BAA2B,EAAE,MAAM,gFAAgF,CAAC;AAC7H,OAAO,EAAE,4BAA4B,EAAE,MAAM,oFAAoF,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAGH,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,iBAAiB,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAClH,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,SAAS,MAAM,YAAY,CAAC;AAGxC,OAAO,EAAE,cAAc,EAAE,MAAM,oDAAoD,CAAC;AACpF,OAAO,EAAE,kCAAkC,EAAE,4BAA4B,EAAE,MAAM,oFAAoF,CAAC;AACtK,OAAO,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,0DAA0D,CAAC;AAClI,OAAO,EAAE,sBAAsB,EAAE,MAAM,sEAAsE,CAAC;AAC9G,OAAO,EAAE,2BAA2B,EAAE,+BAA+B,EAAE,MAAM,gFAAgF,CAAC;AAC9J,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,oEAAoE,CAAC"}
package/lib/index.js CHANGED
@@ -1,9 +1,4 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getImpersonatedAuthSessionId = exports.validateAppSessionSignature = exports.requestAppSession = exports.getLoginRedirectionUri = exports.validateAuthSessionId = exports.getAuthSession = exports.InvalidAppSessionSignatureError = exports.NotFoundError = exports.ForbiddenError = exports.UnauthorizedError = void 0;
7
2
  /**
8
3
  <div align="center">
9
4
  <h1>@dvelop-sdk/identityprovider</h1>
@@ -29,24 +24,48 @@ exports.getImpersonatedAuthSessionId = exports.validateAppSessionSignature = exp
29
24
  </div>
30
25
  * @module identityprovider
31
26
  */
32
- var axios_1 = __importDefault(require("axios"));
33
- var axios_hal_json_1 = require("@dvelop-sdk/axios-hal-json");
34
- axios_1.default.interceptors.request.use(axios_hal_json_1.followHalJson);
35
- var errors_1 = require("./errors");
36
- Object.defineProperty(exports, "UnauthorizedError", { enumerable: true, get: function () { return errors_1.UnauthorizedError; } });
37
- Object.defineProperty(exports, "ForbiddenError", { enumerable: true, get: function () { return errors_1.ForbiddenError; } });
38
- Object.defineProperty(exports, "NotFoundError", { enumerable: true, get: function () { return errors_1.NotFoundError; } });
39
- Object.defineProperty(exports, "InvalidAppSessionSignatureError", { enumerable: true, get: function () { return errors_1.InvalidAppSessionSignatureError; } });
27
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
28
+ if (k2 === undefined) k2 = k;
29
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
30
+ }) : (function(o, m, k, k2) {
31
+ if (k2 === undefined) k2 = k;
32
+ o[k2] = m[k];
33
+ }));
34
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
35
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
36
+ }) : function(o, v) {
37
+ o["default"] = v;
38
+ });
39
+ var __importStar = (this && this.__importStar) || function (mod) {
40
+ if (mod && mod.__esModule) return mod;
41
+ var result = {};
42
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
43
+ __setModuleDefault(result, mod);
44
+ return result;
45
+ };
46
+ Object.defineProperty(exports, "__esModule", { value: true });
47
+ exports.validateAuthSessionId = exports.InvalidAppSessionSignatureError = exports.validateAppSessionSignature = exports.getLoginRedirectionUri = exports.requestAppSession = exports.getImpersonatedAuthSessionId = exports.getAuthSession = exports.internals = exports.IdentityproviderError = exports.NotFoundError = exports.ForbiddenError = exports.UnauthorizedError = exports.BadInputError = void 0;
48
+ // Utils
49
+ var core_1 = require("@dvelop-sdk/core");
50
+ Object.defineProperty(exports, "BadInputError", { enumerable: true, get: function () { return core_1.BadInputError; } });
51
+ Object.defineProperty(exports, "UnauthorizedError", { enumerable: true, get: function () { return core_1.UnauthorizedError; } });
52
+ Object.defineProperty(exports, "ForbiddenError", { enumerable: true, get: function () { return core_1.ForbiddenError; } });
53
+ Object.defineProperty(exports, "NotFoundError", { enumerable: true, get: function () { return core_1.NotFoundError; } });
54
+ var http_1 = require("./utils/http");
55
+ Object.defineProperty(exports, "IdentityproviderError", { enumerable: true, get: function () { return http_1.IdentityproviderError; } });
56
+ exports.internals = __importStar(require("./internal"));
57
+ // Authentication
40
58
  var get_auth_session_1 = require("./authentication/get-auth-session/get-auth-session");
41
59
  Object.defineProperty(exports, "getAuthSession", { enumerable: true, get: function () { return get_auth_session_1.getAuthSession; } });
42
- var validate_auth_session_id_1 = require("./authentication/validate-auth-session-id/validate-auth-session-id");
43
- Object.defineProperty(exports, "validateAuthSessionId", { enumerable: true, get: function () { return validate_auth_session_id_1.validateAuthSessionId; } });
44
- var get_login_redirection_uri_1 = require("./authentication/get-login-redirection-uri/get-login-redirection-uri");
45
- Object.defineProperty(exports, "getLoginRedirectionUri", { enumerable: true, get: function () { return get_login_redirection_uri_1.getLoginRedirectionUri; } });
60
+ var get_impersonated_auth_session_id_1 = require("./authentication/get-impersonated-auth-session-id/get-impersonated-auth-session-id");
61
+ Object.defineProperty(exports, "getImpersonatedAuthSessionId", { enumerable: true, get: function () { return get_impersonated_auth_session_id_1.getImpersonatedAuthSessionId; } });
46
62
  var request_app_session_1 = require("./authentication/request-app-session/request-app-session");
47
63
  Object.defineProperty(exports, "requestAppSession", { enumerable: true, get: function () { return request_app_session_1.requestAppSession; } });
64
+ var get_login_redirection_uri_1 = require("./authentication/get-login-redirection-uri/get-login-redirection-uri");
65
+ Object.defineProperty(exports, "getLoginRedirectionUri", { enumerable: true, get: function () { return get_login_redirection_uri_1.getLoginRedirectionUri; } });
48
66
  var validate_app_session_signature_1 = require("./authentication/validate-app-session-signature/validate-app-session-signature");
49
67
  Object.defineProperty(exports, "validateAppSessionSignature", { enumerable: true, get: function () { return validate_app_session_signature_1.validateAppSessionSignature; } });
50
- var get_impersonated_auth_session_id_1 = require("./authentication/get-impersonated-auth-session-id/get-impersonated-auth-session-id");
51
- Object.defineProperty(exports, "getImpersonatedAuthSessionId", { enumerable: true, get: function () { return get_impersonated_auth_session_id_1.getImpersonatedAuthSessionId; } });
68
+ Object.defineProperty(exports, "InvalidAppSessionSignatureError", { enumerable: true, get: function () { return validate_app_session_signature_1.InvalidAppSessionSignatureError; } });
69
+ var validate_auth_session_id_1 = require("./authentication/validate-auth-session-id/validate-auth-session-id");
70
+ Object.defineProperty(exports, "validateAuthSessionId", { enumerable: true, get: function () { return validate_auth_session_id_1.validateAuthSessionId; } });
52
71
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,gDAA0B;AAC1B,6DAA2D;AAC3D,eAAK,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,8BAAa,CAAC,CAAC;AAE9C,mCAA6G;AAApG,2GAAA,iBAAiB,OAAA;AAAE,wGAAA,cAAc,OAAA;AAAE,uGAAA,aAAa,OAAA;AAAE,yHAAA,+BAA+B,OAAA;AAE1F,uFAAoF;AAA3E,kHAAA,cAAc,OAAA;AAEvB,+GAA2G;AAAlG,iIAAA,qBAAqB,OAAA;AAC9B,kHAA8G;AAArG,mIAAA,sBAAsB,OAAA;AAC/B,gGAA6F;AAApF,wHAAA,iBAAiB,OAAA;AAC1B,iIAA6H;AAApH,6IAAA,2BAA2B,OAAA;AACpC,uIAAkI;AAAzH,gJAAA,4BAA4B,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;;;;;;;;;;;;;;;;;;;;;;AAEH,QAAQ;AACR,yCAAkH;AAA1F,qGAAA,aAAa,OAAA;AAAE,yGAAA,iBAAiB,OAAA;AAAE,sGAAA,cAAc,OAAA;AAAE,qGAAA,aAAa,OAAA;AACvF,qCAAqD;AAA5C,6GAAA,qBAAqB,OAAA;AAC9B,wDAAwC;AAExC,iBAAiB;AACjB,uFAAoF;AAA3E,kHAAA,cAAc,OAAA;AACvB,uIAAsK;AAAzH,gJAAA,4BAA4B,OAAA;AACzE,gGAAkI;AAAhG,wHAAA,iBAAiB,OAAA;AACnD,kHAA8G;AAArG,mIAAA,sBAAsB,OAAA;AAC/B,iIAA8J;AAArJ,6IAAA,2BAA2B,OAAA;AAAE,iJAAA,+BAA+B,OAAA;AACrE,+GAAuH;AAA9G,iIAAA,qBAAqB,OAAA"}
@@ -0,0 +1,6 @@
1
+ export { _defaultHttpRequestFunctionFactory, _defaultHttpRequestFunction } from "./utils/http";
2
+ export { _getAuthSessionFactory, _getAuthSessionDefaultTransformFunction } from "./authentication/get-auth-session/get-auth-session";
3
+ export { _getImpersonatedAuthSessionIdFactory, _getImpersonatedAuthSessionIdDefaultTransformFunction } from "./authentication/get-impersonated-auth-session-id/get-impersonated-auth-session-id";
4
+ export { _requestAppSessionFactory } from "./authentication/request-app-session/request-app-session";
5
+ export { _validateAuthSessionIdFactory, _validateAuthSessionIdDefaultTransformFunction } from "./authentication/validate-auth-session-id/validate-auth-session-id";
6
+ //# sourceMappingURL=internal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAG/F,OAAO,EAAE,sBAAsB,EAAE,uCAAuC,EAAE,MAAM,oDAAoD,CAAC;AACrI,OAAO,EAAE,oCAAoC,EAAE,qDAAqD,EAAE,MAAM,oFAAoF,CAAC;AACjM,OAAO,EAAE,yBAAyB,EAAE,MAAM,0DAA0D,CAAC;AACrG,OAAO,EAAE,6BAA6B,EAAE,8CAA8C,EAAE,MAAM,oEAAoE,CAAC"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports._validateAuthSessionIdDefaultTransformFunction = exports._validateAuthSessionIdFactory = exports._requestAppSessionFactory = exports._getImpersonatedAuthSessionIdDefaultTransformFunction = exports._getImpersonatedAuthSessionIdFactory = exports._getAuthSessionDefaultTransformFunction = exports._getAuthSessionFactory = exports._defaultHttpRequestFunction = exports._defaultHttpRequestFunctionFactory = void 0;
4
+ var http_1 = require("./utils/http");
5
+ Object.defineProperty(exports, "_defaultHttpRequestFunctionFactory", { enumerable: true, get: function () { return http_1._defaultHttpRequestFunctionFactory; } });
6
+ Object.defineProperty(exports, "_defaultHttpRequestFunction", { enumerable: true, get: function () { return http_1._defaultHttpRequestFunction; } });
7
+ // Authentication
8
+ var get_auth_session_1 = require("./authentication/get-auth-session/get-auth-session");
9
+ Object.defineProperty(exports, "_getAuthSessionFactory", { enumerable: true, get: function () { return get_auth_session_1._getAuthSessionFactory; } });
10
+ Object.defineProperty(exports, "_getAuthSessionDefaultTransformFunction", { enumerable: true, get: function () { return get_auth_session_1._getAuthSessionDefaultTransformFunction; } });
11
+ var get_impersonated_auth_session_id_1 = require("./authentication/get-impersonated-auth-session-id/get-impersonated-auth-session-id");
12
+ Object.defineProperty(exports, "_getImpersonatedAuthSessionIdFactory", { enumerable: true, get: function () { return get_impersonated_auth_session_id_1._getImpersonatedAuthSessionIdFactory; } });
13
+ Object.defineProperty(exports, "_getImpersonatedAuthSessionIdDefaultTransformFunction", { enumerable: true, get: function () { return get_impersonated_auth_session_id_1._getImpersonatedAuthSessionIdDefaultTransformFunction; } });
14
+ var request_app_session_1 = require("./authentication/request-app-session/request-app-session");
15
+ Object.defineProperty(exports, "_requestAppSessionFactory", { enumerable: true, get: function () { return request_app_session_1._requestAppSessionFactory; } });
16
+ var validate_auth_session_id_1 = require("./authentication/validate-auth-session-id/validate-auth-session-id");
17
+ Object.defineProperty(exports, "_validateAuthSessionIdFactory", { enumerable: true, get: function () { return validate_auth_session_id_1._validateAuthSessionIdFactory; } });
18
+ Object.defineProperty(exports, "_validateAuthSessionIdDefaultTransformFunction", { enumerable: true, get: function () { return validate_auth_session_id_1._validateAuthSessionIdDefaultTransformFunction; } });
19
+ //# sourceMappingURL=internal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":";;;AAAA,qCAA+F;AAAtF,0HAAA,kCAAkC,OAAA;AAAE,mHAAA,2BAA2B,OAAA;AAExE,iBAAiB;AACjB,uFAAqI;AAA5H,0HAAA,sBAAsB,OAAA;AAAE,2IAAA,uCAAuC,OAAA;AACxE,uIAAiM;AAAxL,wJAAA,oCAAoC,OAAA;AAAE,yKAAA,qDAAqD,OAAA;AACpG,gGAAqG;AAA5F,gIAAA,yBAAyB,OAAA;AAClC,+GAAmK;AAA1J,yIAAA,6BAA6B,OAAA;AAAE,0JAAA,8CAA8C,OAAA"}
@@ -0,0 +1,12 @@
1
+ import { DvelopSdkError } from "@dvelop-sdk/core";
2
+ export { DvelopHttpRequestConfig as HttpConfig, DvelopHttpResponse as HttpResponse } from "@dvelop-sdk/core";
3
+ /**
4
+ * Generic Error for identityprovider-package.
5
+ * @category Error
6
+ */
7
+ export declare class IdentityproviderError extends DvelopSdkError {
8
+ message: string;
9
+ originalError?: Error | undefined;
10
+ constructor(message: string, originalError?: Error | undefined);
11
+ }
12
+ //# sourceMappingURL=http.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/utils/http.ts"],"names":[],"mappings":"AACA,OAAO,EAAiL,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACjO,OAAO,EAAE,uBAAuB,IAAI,UAAU,EAAE,kBAAkB,IAAI,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAE7G;;;EAGE;AAEF,qBAAa,qBAAsB,SAAQ,cAAc;IAEpC,OAAO,EAAE,MAAM;IAAS,aAAa,CAAC;gBAAtC,OAAO,EAAE,MAAM,EAAS,aAAa,CAAC,mBAAO;CAIjE"}