@dvelop-sdk/identityprovider 3.1.0 → 4.0.0

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.
@@ -10,15 +10,6 @@ export interface RequestAppSessionParams {
10
10
  /** Relative URI to which the appSession will be sent via POST */
11
11
  callback: string;
12
12
  }
13
- /**
14
- * AppSession which will be postet to your app after using the {@link requestAppSession}-function.
15
- * @category Authentication
16
- */
17
- export interface AppSession {
18
- appSessionId: string;
19
- expire: string;
20
- sign: string;
21
- }
22
13
  /**
23
14
  * Factory for the {@link requestAppSession}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
24
15
  * @typeparam T Return type of the {@link requestAppSession}-function. A corresponding transformFuntion has to be supplied.
@@ -1 +1 @@
1
- {"version":3,"file":"request-app-session.d.ts","sourceRoot":"","sources":["../../../src/authentication/request-app-session/request-app-session.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,uBAAuB;IACtC,gDAAgD;IAChD,OAAO,EAAE,MAAM,CAAC;IAChB,iEAAiE;IACjE,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,EACzC,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,EAAE,MAAM,EAAE,uBAAuB,KAAK,CAAC,GACxG,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,uBAAuB,KAAK,OAAO,CAAC,CAAC,CAAC,CAgBzE;AAED;;;;;;;;;;;;;;;;GAgBG;AAEH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,CAE9G"}
1
+ {"version":3,"file":"request-app-session.d.ts","sourceRoot":"","sources":["../../../src/authentication/request-app-session/request-app-session.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,uBAAuB;IACtC,gDAAgD;IAChD,OAAO,EAAE,MAAM,CAAC;IAChB,iEAAiE;IACjE,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,EACzC,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,EAAE,MAAM,EAAE,uBAAuB,KAAK,CAAC,GACxG,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,uBAAuB,KAAK,OAAO,CAAC,CAAC,CAAC,CAgBzE;AAED;;;;;;;;;;;;;;;;GAgBG;AAEH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,CAE9G"}
@@ -1 +1 @@
1
- {"version":3,"file":"request-app-session.js","sourceRoot":"","sources":["../../../src/authentication/request-app-session/request-app-session.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,yCAAyF;AAuBzF;;;;GAIG;AACH,SAAgB,yBAAyB,CACvC,mBAA0F,EAC1F,iBAAyG;IAF3G,iBAmBC;IAdC,OAAO,UAAO,OAAsB,EAAE,MAA+B;;;;wBAElD,qBAAM,mBAAmB,CAAC,OAAO,EAAE;wBAClD,MAAM,EAAE,MAAM;wBACd,GAAG,EAAE,8BAA8B;wBACnC,IAAI,EAAE;4BACJ,OAAO,EAAE,MAAM,CAAC,OAAO;4BACvB,QAAQ,EAAE,MAAM,CAAC,QAAQ;4BACzB,SAAS,EAAE,OAAO,CAAC,SAAS;yBAC7B;qBACF,CAAC,EAAA;;oBARI,QAAQ,GAAG,SAQf;oBAEF,sBAAO,iBAAiB,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,EAAC;;;SACrD,CAAC;AACJ,CAAC;AAnBD,8DAmBC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,0BAA0B;AAC1B,SAAsB,iBAAiB,CAAC,OAAsB,EAAE,MAA+B;;;;wBACtF,qBAAM,yBAAyB,CAAC,kCAA2B,EAAE,cAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,EAAA;wBAA/F,sBAAO,SAAwF,EAAC;;;;CACjG;AAFD,8CAEC"}
1
+ {"version":3,"file":"request-app-session.js","sourceRoot":"","sources":["../../../src/authentication/request-app-session/request-app-session.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,yCAAyF;AAazF;;;;GAIG;AACH,SAAgB,yBAAyB,CACvC,mBAA0F,EAC1F,iBAAyG;IAF3G,iBAmBC;IAdC,OAAO,UAAO,OAAsB,EAAE,MAA+B;;;;wBAElD,qBAAM,mBAAmB,CAAC,OAAO,EAAE;wBAClD,MAAM,EAAE,MAAM;wBACd,GAAG,EAAE,8BAA8B;wBACnC,IAAI,EAAE;4BACJ,OAAO,EAAE,MAAM,CAAC,OAAO;4BACvB,QAAQ,EAAE,MAAM,CAAC,QAAQ;4BACzB,SAAS,EAAE,OAAO,CAAC,SAAS;yBAC7B;qBACF,CAAC,EAAA;;oBARI,QAAQ,GAAG,SAQf;oBAEF,sBAAO,iBAAiB,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,EAAC;;;SACrD,CAAC;AACJ,CAAC;AAnBD,8DAmBC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,0BAA0B;AAC1B,SAAsB,iBAAiB,CAAC,OAAsB,EAAE,MAA+B;;;;wBACtF,qBAAM,yBAAyB,CAAC,kCAA2B,EAAE,cAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,EAAA;wBAA/F,sBAAO,SAAwF,EAAC;;;;CACjG;AAFD,8CAEC"}
@@ -1,4 +1,3 @@
1
- import { AppSession } from "../request-app-session/request-app-session";
2
1
  /**
3
2
  * Indicates an invalid sign-value
4
3
  * @category Error
@@ -6,6 +5,15 @@ import { AppSession } from "../request-app-session/request-app-session";
6
5
  export declare class InvalidAppSessionSignatureError extends Error {
7
6
  constructor();
8
7
  }
8
+ /**
9
+ * AppSession which will be postet to your app after using the {@link requestAppSession}-function.
10
+ * @category Authentication
11
+ */
12
+ export interface AppSession {
13
+ authSessionId: string;
14
+ expire: string;
15
+ sign: string;
16
+ }
9
17
  /**
10
18
  * 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).
11
19
  *
@@ -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":"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
+ {"version":3,"file":"validate-app-session-signature.d.ts","sourceRoot":"","sources":["../../../src/authentication/validate-app-session-signature/validate-app-session-signature.ts"],"names":[],"mappings":"AAEA;;;EAGE;AACF,qBAAa,+BAAgC,SAAQ,KAAK;;CAMzD;AAED;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,GAAG,IAAI,CAK5G"}
@@ -47,7 +47,7 @@ exports.InvalidAppSessionSignatureError = InvalidAppSessionSignatureError;
47
47
  * @category Authentication
48
48
  */
49
49
  function validateAppSessionSignature(appName, requestId, appSession) {
50
- var expectedSign = crypto_1.createHash("sha256").update(appName + appSession.appSessionId + appSession.expire + requestId, "utf8").digest("hex");
50
+ var expectedSign = crypto_1.createHash("sha256").update(appName + appSession.authSessionId + appSession.expire + requestId, "utf8").digest("hex");
51
51
  if (expectedSign !== appSession.sign) {
52
52
  throw new InvalidAppSessionSignatureError();
53
53
  }
@@ -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;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
+ {"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;AAEpC;;;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;AAkB5C;;;;;;;;;;;;;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,aAAa,GAAG,UAAU,CAAC,MAAM,GAAG,SAAS,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACnJ,IAAI,YAAY,KAAK,UAAU,CAAC,IAAI,EAAE;QACpC,MAAM,IAAI,+BAA+B,EAAE,CAAC;KAC7C;AACH,CAAC;AALD,kEAKC"}
package/lib/index.d.ts CHANGED
@@ -14,7 +14,7 @@
14
14
  <img alt="license" src="https://img.shields.io/github/license/d-velop/dvelop-sdk-node?style=for-the-badge">
15
15
  </a
16
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>
17
+ <p>This package contains functionality for the <a href="https://developer.d-velop.de/documentation/idpapi/en">Identityprovider-App</a> in the d.velop cloud.</p>
18
18
  <a href="https://d-velop.github.io/dvelop-sdk-node/modules/identityprovider.html"><strong>Explore the docs »</strong></a>
19
19
  </br>
20
20
  <a href="https://www.npmjs.com/package/@dvelop-sdk/identityprovider"><strong>Install via npm »</strong></a>
@@ -34,8 +34,8 @@ export { IdentityproviderError } from "./utils/http";
34
34
  export * as internals from "./internal";
35
35
  export { getAuthSession } from "./authentication/get-auth-session/get-auth-session";
36
36
  export { GetImpersonatedAuthSessionIdParams, getImpersonatedAuthSessionId } from "./authentication/get-impersonated-auth-session-id/get-impersonated-auth-session-id";
37
- export { RequestAppSessionParams, requestAppSession, AppSession } from "./authentication/request-app-session/request-app-session";
37
+ export { RequestAppSessionParams, requestAppSession } from "./authentication/request-app-session/request-app-session";
38
38
  export { getLoginRedirectionUri } from "./authentication/get-login-redirection-uri/get-login-redirection-uri";
39
- export { validateAppSessionSignature, InvalidAppSessionSignatureError } from "./authentication/validate-app-session-signature/validate-app-session-signature";
39
+ export { AppSession, validateAppSessionSignature, InvalidAppSessionSignatureError } from "./authentication/validate-app-session-signature/validate-app-session-signature";
40
40
  export { validateAuthSessionId, DvelopUser } from "./authentication/validate-auth-session-id/validate-auth-session-id";
41
41
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,oEAAoE,CAAC;AAEhG,OAAO,QAAQ,kBAAkB,CAAC;IAChC,UAAU,aAAa;QACrB,IAAI,CAAC,EAAE,UA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CAAC;AACtH,OAAO,EAAE,sBAAsB,EAAE,MAAM,sEAAsE,CAAC;AAC9G,OAAO,EAAE,UAAU,EAAE,2BAA2B,EAAE,+BAA+B,EAAE,MAAM,gFAAgF,CAAC;AAC1K,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,oEAAoE,CAAC"}
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAiCA,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"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAiCA,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,gGAAsH;AAApF,wHAAA,iBAAiB,OAAA;AACnD,kHAA8G;AAArG,mIAAA,sBAAsB,OAAA;AAC/B,iIAA0K;AAArJ,6IAAA,2BAA2B,OAAA;AAAE,iJAAA,+BAA+B,OAAA;AACjF,+GAAuH;AAA9G,iIAAA,qBAAqB,OAAA"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dvelop-sdk/identityprovider",
3
3
  "description": "This package contains functionality for the Identityprovider-App in the d.velop cloud.",
4
- "version": "3.1.0",
4
+ "version": "4.0.0",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",
@@ -25,4 +25,4 @@
25
25
  "dependencies": {
26
26
  "@dvelop-sdk/core": "^2.0.0"
27
27
  }
28
- }
28
+ }