@dvelop-sdk/identityprovider 3.0.0 → 3.1.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.
- package/README.md +1 -1
- package/lib/authentication/get-auth-session/get-auth-session.d.ts +27 -10
- package/lib/authentication/get-auth-session/get-auth-session.d.ts.map +1 -1
- package/lib/authentication/get-auth-session/get-auth-session.js +13 -6
- package/lib/authentication/get-auth-session/get-auth-session.js.map +1 -1
- package/lib/authentication/get-impersonated-auth-session-id/get-impersonated-auth-session-id.d.ts +31 -6
- package/lib/authentication/get-impersonated-auth-session-id/get-impersonated-auth-session-id.d.ts.map +1 -1
- package/lib/authentication/get-impersonated-auth-session-id/get-impersonated-auth-session-id.js +14 -7
- package/lib/authentication/get-impersonated-auth-session-id/get-impersonated-auth-session-id.js.map +1 -1
- package/lib/authentication/get-login-redirection-uri/get-login-redirection-uri.d.ts +4 -6
- package/lib/authentication/get-login-redirection-uri/get-login-redirection-uri.d.ts.map +1 -1
- package/lib/authentication/get-login-redirection-uri/get-login-redirection-uri.js +4 -6
- package/lib/authentication/get-login-redirection-uri/get-login-redirection-uri.js.map +1 -1
- package/lib/authentication/request-app-session/request-app-session.d.ts +29 -5
- package/lib/authentication/request-app-session/request-app-session.d.ts.map +1 -1
- package/lib/authentication/request-app-session/request-app-session.js +14 -5
- package/lib/authentication/request-app-session/request-app-session.js.map +1 -1
- package/lib/authentication/validate-app-session-signature/validate-app-session-signature.d.ts +9 -16
- package/lib/authentication/validate-app-session-signature/validate-app-session-signature.d.ts.map +1 -1
- package/lib/authentication/validate-app-session-signature/validate-app-session-signature.js +10 -18
- package/lib/authentication/validate-app-session-signature/validate-app-session-signature.js.map +1 -1
- package/lib/authentication/validate-auth-session-id/validate-auth-session-id.d.ts +18 -4
- package/lib/authentication/validate-auth-session-id/validate-auth-session-id.d.ts.map +1 -1
- package/lib/authentication/validate-auth-session-id/validate-auth-session-id.js +13 -5
- package/lib/authentication/validate-auth-session-id/validate-auth-session-id.js.map +1 -1
- package/lib/index.d.ts +9 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +0 -25
- package/lib/index.js.map +1 -1
- package/lib/utils/http.d.ts +13 -1
- package/lib/utils/http.d.ts.map +1 -1
- package/package.json +4 -7
- package/LICENSE +0 -201
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
</br>
|
|
17
17
|
|
|
18
|
-
<p>This package contains functionality for the <a href="https://developer.d-velop.de/documentation/idpapi/en
|
|
18
|
+
<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>
|
|
19
19
|
|
|
20
20
|
<a href="https://d-velop.github.io/dvelop-sdk-node/modules/identityprovider.html"><strong>Explore the docs »</strong></a>
|
|
21
21
|
|
|
@@ -1,28 +1,45 @@
|
|
|
1
1
|
import { DvelopContext } from "../../../../core/lib";
|
|
2
|
+
import { HttpConfig, HttpResponse } from "../../utils/http";
|
|
2
3
|
/**
|
|
3
4
|
* Used for authentication in the d.velop cloud. Refer to the [documentation](https://developer.d-velop.de/documentation/idpapi/en/identityprovider-app-201523580.html#validating-the-login) for further information.
|
|
4
5
|
* @category Authentication
|
|
5
6
|
*/
|
|
6
7
|
export interface AuthSession {
|
|
7
|
-
/**
|
|
8
|
-
* This key will validate your requests (usually sent as Bearer-Token). **The AuthSessionId should be kept secret and never be publicly available**
|
|
9
|
-
*/
|
|
8
|
+
/** This key will validate your requests (usually sent as Bearer-Token). **The AuthSessionId should be kept secret and never be publicly available** */
|
|
10
9
|
id: string;
|
|
11
|
-
/**
|
|
12
|
-
* Date at which the AuthSessionId will no longer be valid.
|
|
13
|
-
*/
|
|
10
|
+
/** Date at which the AuthSessionId will no longer be valid. */
|
|
14
11
|
expire: Date;
|
|
15
12
|
}
|
|
16
13
|
/**
|
|
17
|
-
*
|
|
14
|
+
* Default transform-function provided to the {@link getAuthSession}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
15
|
+
* @internal
|
|
16
|
+
* @category Authentication
|
|
17
|
+
*/
|
|
18
|
+
export declare function _getAuthSessionDefaultTransformFunction(response: HttpResponse, _: DvelopContext): AuthSession;
|
|
19
|
+
/**
|
|
20
|
+
* Factory for the {@link getAuthSession}-function. See internals for more information. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
21
|
+
* @typeparam T Return type of the {@link getAuthSession}-function. A corresponding transformFuntion has to be supplied.
|
|
22
|
+
* @internal
|
|
23
|
+
* @category Authentication
|
|
24
|
+
*/
|
|
25
|
+
export declare function _getAuthSessionFactory<T>(httpRequestFunction: (context: DvelopContext, config: HttpConfig) => Promise<HttpResponse>, transformFunction: (response: HttpResponse, context: DvelopContext) => T): (context: DvelopContext) => Promise<T>;
|
|
26
|
+
/**
|
|
27
|
+
* Returns an {@link AuthSession} based on an API-Key. API-Keys can be generated by d.velop cloud tenant administrators.
|
|
18
28
|
* **The AuthSessionId should be kept secret and never be publicly available.**
|
|
19
29
|
*
|
|
20
|
-
* @category Authentication
|
|
21
30
|
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
31
|
+
* ```typescript
|
|
32
|
+
* import { getAuthSession } from "@dvelop-sdk/identityprovider";
|
|
33
|
+
*
|
|
34
|
+
* const authSession = await getAuthSession({
|
|
35
|
+
* systemBaseUri: "https://monster-ag.d-velop.cloud",
|
|
36
|
+
* authSessionId: "dQw4w9WgXcQ"
|
|
37
|
+
* });
|
|
38
|
+
*
|
|
39
|
+
console.log(authSession);
|
|
24
40
|
* ```
|
|
25
41
|
*
|
|
42
|
+
* @category Authentication
|
|
26
43
|
*/
|
|
27
44
|
export declare function getAuthSession(context: DvelopContext): Promise<AuthSession>;
|
|
28
45
|
//# sourceMappingURL=get-auth-session.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-auth-session.d.ts","sourceRoot":"","sources":["../../../src/authentication/get-auth-session/get-auth-session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"get-auth-session.d.ts","sourceRoot":"","sources":["../../../src/authentication/get-auth-session/get-auth-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,WAAW;IAC1B,uJAAuJ;IACvJ,EAAE,EAAE,MAAM,CAAC;IACX,+DAA+D;IAC/D,MAAM,EAAE,IAAI,CAAC;CACd;AAED;;;;GAIG;AACH,wBAAgB,uCAAuC,CAAC,QAAQ,EAAE,YAAY,EAAE,CAAC,EAAE,aAAa,GAAG,WAAW,CAK7G;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EACtC,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;;;;;;;;;;;;;;;;;GAiBG;AAEH,wBAAsB,cAAc,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,WAAW,CAAC,CAEjF"}
|
|
@@ -39,7 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
exports.getAuthSession = exports._getAuthSessionFactory = exports._getAuthSessionDefaultTransformFunction = void 0;
|
|
40
40
|
var http_1 = require("../../utils/http");
|
|
41
41
|
/**
|
|
42
|
-
* Default transform-function provided to the {@link getAuthSession}-function.
|
|
42
|
+
* Default transform-function provided to the {@link getAuthSession}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
43
43
|
* @internal
|
|
44
44
|
* @category Authentication
|
|
45
45
|
*/
|
|
@@ -51,7 +51,7 @@ function _getAuthSessionDefaultTransformFunction(response, _) {
|
|
|
51
51
|
}
|
|
52
52
|
exports._getAuthSessionDefaultTransformFunction = _getAuthSessionDefaultTransformFunction;
|
|
53
53
|
/**
|
|
54
|
-
* Factory for the {@link getAuthSession}-function. See internals for more information.
|
|
54
|
+
* Factory for the {@link getAuthSession}-function. See internals for more information. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
55
55
|
* @typeparam T Return type of the {@link getAuthSession}-function. A corresponding transformFuntion has to be supplied.
|
|
56
56
|
* @internal
|
|
57
57
|
* @category Authentication
|
|
@@ -76,15 +76,22 @@ function _getAuthSessionFactory(httpRequestFunction, transformFunction) {
|
|
|
76
76
|
}
|
|
77
77
|
exports._getAuthSessionFactory = _getAuthSessionFactory;
|
|
78
78
|
/**
|
|
79
|
-
* Returns an
|
|
79
|
+
* Returns an {@link AuthSession} based on an API-Key. API-Keys can be generated by d.velop cloud tenant administrators.
|
|
80
80
|
* **The AuthSessionId should be kept secret and never be publicly available.**
|
|
81
81
|
*
|
|
82
|
-
* @category Authentication
|
|
83
82
|
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
83
|
+
* ```typescript
|
|
84
|
+
* import { getAuthSession } from "@dvelop-sdk/identityprovider";
|
|
85
|
+
*
|
|
86
|
+
* const authSession = await getAuthSession({
|
|
87
|
+
* systemBaseUri: "https://monster-ag.d-velop.cloud",
|
|
88
|
+
* authSessionId: "dQw4w9WgXcQ"
|
|
89
|
+
* });
|
|
90
|
+
*
|
|
91
|
+
console.log(authSession);
|
|
86
92
|
* ```
|
|
87
93
|
*
|
|
94
|
+
* @category Authentication
|
|
88
95
|
*/
|
|
89
96
|
/* istanbul ignore next */
|
|
90
97
|
function getAuthSession(context) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-auth-session.js","sourceRoot":"","sources":["../../../src/authentication/get-auth-session/get-auth-session.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,yCAAyF;
|
|
1
|
+
{"version":3,"file":"get-auth-session.js","sourceRoot":"","sources":["../../../src/authentication/get-auth-session/get-auth-session.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,yCAAyF;AAazF;;;;GAIG;AACH,SAAgB,uCAAuC,CAAC,QAAsB,EAAE,CAAgB;IAC9F,OAAO;QACL,EAAE,EAAE,QAAQ,CAAC,IAAI,CAAC,aAAa;QAC/B,MAAM,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC;KACvC,CAAC;AACJ,CAAC;AALD,0FAKC;AAED;;;;;GAKG;AACH,SAAgB,sBAAsB,CACpC,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,OAAO,CAAC;qBACnB,CAAC,EAAA;;oBAJI,QAAQ,GAAiB,SAI7B;oBACF,sBAAO,iBAAiB,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAC;;;SAC7C,CAAC;AACJ,CAAC;AAZD,wDAYC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,0BAA0B;AAC1B,SAAsB,cAAc,CAAC,OAAsB;;;YACzD,sBAAO,sBAAsB,CAAC,kCAA2B,EAAE,uCAAuC,CAAC,CAAC,OAAO,CAAC,EAAC;;;CAC9G;AAFD,wCAEC"}
|
package/lib/authentication/get-impersonated-auth-session-id/get-impersonated-auth-session-id.d.ts
CHANGED
|
@@ -1,17 +1,42 @@
|
|
|
1
|
-
import { DvelopContext } from "
|
|
1
|
+
import { DvelopContext } from "@dvelop-sdk/core";
|
|
2
|
+
import { HttpConfig, HttpResponse } from "../../utils/http";
|
|
3
|
+
/**
|
|
4
|
+
* Parameters for the {@link getImpersonatedAuthSessionId}-function.
|
|
5
|
+
* @category Authentication
|
|
6
|
+
*/
|
|
2
7
|
export interface GetImpersonatedAuthSessionIdParams {
|
|
3
8
|
userId: string;
|
|
4
9
|
}
|
|
5
10
|
/**
|
|
6
|
-
*
|
|
11
|
+
* Default transform-function provided to the {@link getImpersontedAuthSessionId}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
12
|
+
* @internal
|
|
13
|
+
* @category Authentication
|
|
14
|
+
*/
|
|
15
|
+
export declare function _getImpersonatedAuthSessionIdDefaultTransformFunction(response: HttpResponse, _: DvelopContext, __: GetImpersonatedAuthSessionIdParams): string;
|
|
16
|
+
/**
|
|
17
|
+
* Factory for the {@link getImpersonatedAuthSessionId}}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
18
|
+
* @typeparam T Return type of the {@link getImpersonatedAuthSessionId}-function. A corresponding transformFuntion has to be supplied.
|
|
19
|
+
* @internal
|
|
20
|
+
* @category Authentication
|
|
21
|
+
*/
|
|
22
|
+
export declare function _getImpersonatedAuthSessionIdFactory<T>(httpRequestFunction: (context: DvelopContext, config: HttpConfig) => Promise<HttpResponse>, transformFunction: (response: HttpResponse, context: DvelopContext, params: GetImpersonatedAuthSessionIdParams) => T): (context: DvelopContext, params: GetImpersonatedAuthSessionIdParams) => Promise<T>;
|
|
23
|
+
/**
|
|
24
|
+
* Returns an authSessionId for the given user. All requests with this authSessionId will be in that users name.
|
|
7
25
|
* **The AuthSessionId should be kept secret and never be publicly available.**
|
|
8
26
|
*
|
|
9
|
-
*
|
|
27
|
+
* ```typescript
|
|
28
|
+
* import { getImpersonatedAuthSessionId } from "@dvelop-sdk/identityprovider";
|
|
10
29
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
30
|
+
* const authSessionId = await getImpersonatedAuthSessionId({
|
|
31
|
+
* systemBaseUri: "https://monster-ag.d-velop.cloud",
|
|
32
|
+
* authSessionId: "dQw4w9WgXcQ" // has to be an AppSession
|
|
33
|
+
* }, {
|
|
34
|
+
* userId: "XiFkyR35v2Y"
|
|
35
|
+
* });
|
|
14
36
|
*
|
|
37
|
+
* console.log(authSessionId);
|
|
38
|
+
* ```
|
|
39
|
+
* @category Authentication
|
|
15
40
|
*/
|
|
16
41
|
export declare function getImpersonatedAuthSessionId(context: DvelopContext, params: GetImpersonatedAuthSessionIdParams): Promise<string>;
|
|
17
42
|
//# sourceMappingURL=get-impersonated-auth-session-id.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-impersonated-auth-session-id.d.ts","sourceRoot":"","sources":["../../../src/authentication/get-impersonated-auth-session-id/get-impersonated-auth-session-id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"get-impersonated-auth-session-id.d.ts","sourceRoot":"","sources":["../../../src/authentication/get-impersonated-auth-session-id/get-impersonated-auth-session-id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,YAAY,EAA+B,MAAM,kBAAkB,CAAC;AAEzF;;;GAGG;AACH,MAAM,WAAW,kCAAkC;IACjD,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,wBAAgB,qDAAqD,CAAC,QAAQ,EAAE,YAAY,EAAE,CAAC,EAAE,aAAa,EAAE,EAAE,EAAE,kCAAkC,GAAG,MAAM,CAE9J;AAED;;;;;GAKG;AACH,wBAAgB,oCAAoC,CAAC,CAAC,EACpD,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,kCAAkC,KAAK,CAAC,GACnH,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,kCAAkC,KAAK,OAAO,CAAC,CAAC,CAAC,CAWpF;AAED;;;;;;;;;;;;;;;;;GAiBG;AAEH,wBAAsB,4BAA4B,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,kCAAkC,GAAG,OAAO,CAAC,MAAM,CAAC,CAEtI"}
|
package/lib/authentication/get-impersonated-auth-session-id/get-impersonated-auth-session-id.js
CHANGED
|
@@ -39,7 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
exports.getImpersonatedAuthSessionId = exports._getImpersonatedAuthSessionIdFactory = exports._getImpersonatedAuthSessionIdDefaultTransformFunction = void 0;
|
|
40
40
|
var http_1 = require("../../utils/http");
|
|
41
41
|
/**
|
|
42
|
-
* Default transform-function provided to the {@link getImpersontedAuthSessionId}-function.
|
|
42
|
+
* Default transform-function provided to the {@link getImpersontedAuthSessionId}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
43
43
|
* @internal
|
|
44
44
|
* @category Authentication
|
|
45
45
|
*/
|
|
@@ -48,7 +48,7 @@ function _getImpersonatedAuthSessionIdDefaultTransformFunction(response, _, __)
|
|
|
48
48
|
}
|
|
49
49
|
exports._getImpersonatedAuthSessionIdDefaultTransformFunction = _getImpersonatedAuthSessionIdDefaultTransformFunction;
|
|
50
50
|
/**
|
|
51
|
-
* Factory for the {@link getImpersonatedAuthSessionId}}-function. See
|
|
51
|
+
* Factory for the {@link getImpersonatedAuthSessionId}}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
52
52
|
* @typeparam T Return type of the {@link getImpersonatedAuthSessionId}-function. A corresponding transformFuntion has to be supplied.
|
|
53
53
|
* @internal
|
|
54
54
|
* @category Authentication
|
|
@@ -75,15 +75,22 @@ function _getImpersonatedAuthSessionIdFactory(httpRequestFunction, transformFunc
|
|
|
75
75
|
}
|
|
76
76
|
exports._getImpersonatedAuthSessionIdFactory = _getImpersonatedAuthSessionIdFactory;
|
|
77
77
|
/**
|
|
78
|
-
* Returns an
|
|
78
|
+
* Returns an authSessionId for the given user. All requests with this authSessionId will be in that users name.
|
|
79
79
|
* **The AuthSessionId should be kept secret and never be publicly available.**
|
|
80
80
|
*
|
|
81
|
-
*
|
|
81
|
+
* ```typescript
|
|
82
|
+
* import { getImpersonatedAuthSessionId } from "@dvelop-sdk/identityprovider";
|
|
82
83
|
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
84
|
+
* const authSessionId = await getImpersonatedAuthSessionId({
|
|
85
|
+
* systemBaseUri: "https://monster-ag.d-velop.cloud",
|
|
86
|
+
* authSessionId: "dQw4w9WgXcQ" // has to be an AppSession
|
|
87
|
+
* }, {
|
|
88
|
+
* userId: "XiFkyR35v2Y"
|
|
89
|
+
* });
|
|
86
90
|
*
|
|
91
|
+
* console.log(authSessionId);
|
|
92
|
+
* ```
|
|
93
|
+
* @category Authentication
|
|
87
94
|
*/
|
|
88
95
|
/* istanbul ignore next */
|
|
89
96
|
function getImpersonatedAuthSessionId(context, params) {
|
package/lib/authentication/get-impersonated-auth-session-id/get-impersonated-auth-session-id.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-impersonated-auth-session-id.js","sourceRoot":"","sources":["../../../src/authentication/get-impersonated-auth-session-id/get-impersonated-auth-session-id.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,yCAAyF;
|
|
1
|
+
{"version":3,"file":"get-impersonated-auth-session-id.js","sourceRoot":"","sources":["../../../src/authentication/get-impersonated-auth-session-id/get-impersonated-auth-session-id.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,yCAAyF;AAUzF;;;;GAIG;AACH,SAAgB,qDAAqD,CAAC,QAAsB,EAAE,CAAgB,EAAE,EAAsC;IACpJ,OAAO,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC;AACrC,CAAC;AAFD,sHAEC;AAED;;;;;GAKG;AACH,SAAgB,oCAAoC,CAClD,mBAA0F,EAC1F,iBAAoH;IAFtH,iBAcC;IAVC,OAAO,UAAO,OAAsB,EAAE,MAA0C;;;;wBAC/C,qBAAM,mBAAmB,CAAC,OAAO,EAAE;wBAChE,MAAM,EAAE,KAAK;wBACb,GAAG,EAAE,sCAAsC;wBAC3C,MAAM,EAAE;4BACN,MAAM,EAAE,MAAM,CAAC,MAAM;yBACtB;qBACF,CAAC,EAAA;;oBANI,QAAQ,GAAiB,SAM7B;oBACF,sBAAO,iBAAiB,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,EAAC;;;SACrD,CAAC;AACJ,CAAC;AAdD,oFAcC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,0BAA0B;AAC1B,SAAsB,4BAA4B,CAAC,OAAsB,EAAE,MAA0C;;;YACnH,sBAAO,oCAAoC,CAAC,kCAA2B,EAAE,qDAAqD,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,EAAC;;;CAClJ;AAFD,oEAEC"}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Returns the URI a request should be redirected to in case it does not contain a valid authSessionId. Redirected requests will display a HTML Login for users to authenticate.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* ```typescript
|
|
5
|
+
* const redirectionUri = getLoginRedirectionUri("https://monster-ag.d-velop.cloud/cda-compliance/feature");
|
|
6
|
+
* redirect(redirectionUri); // respond with 302
|
|
7
|
+
* ```
|
|
5
8
|
*
|
|
6
9
|
* @category Authentication
|
|
7
|
-
*
|
|
8
|
-
* @example ```typescript
|
|
9
|
-
* const redirectionUri = getLoginRedirectionUri("<ORIGINAL_URL>");
|
|
10
|
-
* request.redirect(redirectionUri);
|
|
11
|
-
* ```
|
|
12
10
|
*/
|
|
13
11
|
export declare function getLoginRedirectionUri(successUri: string): string;
|
|
14
12
|
//# sourceMappingURL=get-login-redirection-uri.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-login-redirection-uri.d.ts","sourceRoot":"","sources":["../../../src/authentication/get-login-redirection-uri/get-login-redirection-uri.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"get-login-redirection-uri.d.ts","sourceRoot":"","sources":["../../../src/authentication/get-login-redirection-uri/get-login-redirection-uri.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAEjE"}
|
|
@@ -4,14 +4,12 @@ exports.getLoginRedirectionUri = void 0;
|
|
|
4
4
|
/**
|
|
5
5
|
* Returns the URI a request should be redirected to in case it does not contain a valid authSessionId. Redirected requests will display a HTML Login for users to authenticate.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
7
|
+
* ```typescript
|
|
8
|
+
* const redirectionUri = getLoginRedirectionUri("https://monster-ag.d-velop.cloud/cda-compliance/feature");
|
|
9
|
+
* redirect(redirectionUri); // respond with 302
|
|
10
|
+
* ```
|
|
8
11
|
*
|
|
9
12
|
* @category Authentication
|
|
10
|
-
*
|
|
11
|
-
* @example ```typescript
|
|
12
|
-
* const redirectionUri = getLoginRedirectionUri("<ORIGINAL_URL>");
|
|
13
|
-
* request.redirect(redirectionUri);
|
|
14
|
-
* ```
|
|
15
13
|
*/
|
|
16
14
|
function getLoginRedirectionUri(successUri) {
|
|
17
15
|
return "/identityprovider/login?redirect=" + encodeURIComponent(successUri);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-login-redirection-uri.js","sourceRoot":"","sources":["../../../src/authentication/get-login-redirection-uri/get-login-redirection-uri.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"get-login-redirection-uri.js","sourceRoot":"","sources":["../../../src/authentication/get-login-redirection-uri/get-login-redirection-uri.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;GASG;AACH,SAAgB,sBAAsB,CAAC,UAAkB;IACvD,OAAO,sCAAoC,kBAAkB,CAAC,UAAU,CAAG,CAAC;AAC9E,CAAC;AAFD,wDAEC"}
|
|
@@ -1,22 +1,46 @@
|
|
|
1
1
|
import { DvelopContext } from "../../../../core/lib";
|
|
2
2
|
import { HttpConfig, HttpResponse } from "../../utils/http";
|
|
3
|
+
/**
|
|
4
|
+
* Parameters for the {@link requestAppSession}-function.
|
|
5
|
+
* @category Authentication
|
|
6
|
+
*/
|
|
3
7
|
export interface RequestAppSessionParams {
|
|
8
|
+
/** Name of the app requesting the appSession */
|
|
4
9
|
appName: string;
|
|
10
|
+
/** Relative URI to which the appSession will be sent via POST */
|
|
5
11
|
callback: string;
|
|
6
12
|
}
|
|
7
13
|
/**
|
|
8
|
-
*
|
|
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
|
+
/**
|
|
23
|
+
* Factory for the {@link requestAppSession}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
9
24
|
* @typeparam T Return type of the {@link requestAppSession}-function. A corresponding transformFuntion has to be supplied.
|
|
10
|
-
* @category
|
|
25
|
+
* @category Authentication
|
|
11
26
|
*/
|
|
12
27
|
export declare function _requestAppSessionFactory<T>(httpRequestFunction: (context: DvelopContext, config: HttpConfig) => Promise<HttpResponse>, transformFunction: (response: HttpResponse, context: DvelopContext, params: RequestAppSessionParams) => T): (context: DvelopContext, params: RequestAppSessionParams) => Promise<T>;
|
|
13
28
|
/**
|
|
14
|
-
* Request an
|
|
29
|
+
* Request an appSession for your app. The appSession will be sent via POST to your defined callback.
|
|
30
|
+
* **Do not forget to validate the appSessionId via the {@link validateAppSessionSignature}-function**
|
|
15
31
|
*
|
|
16
32
|
* ```typescript
|
|
17
|
-
*
|
|
33
|
+
* import { requestAppSession } from "@dvelop-sdk/identityprovider";
|
|
34
|
+
*
|
|
35
|
+
* await requestAppSession({
|
|
36
|
+
* systemBaseUri: "https://monster-ag.d-velop.cloud",
|
|
37
|
+
* authSessionId: "dQw4w9WgXcQ"
|
|
38
|
+
* }, {
|
|
39
|
+
* appName: "cda-compliance",
|
|
40
|
+
* callback: "/cda-compliance/appsession"
|
|
41
|
+
* });
|
|
18
42
|
* ```
|
|
19
|
-
* @category
|
|
43
|
+
* @category Authentication
|
|
20
44
|
*/
|
|
21
45
|
export declare function requestAppSession(context: DvelopContext, params: RequestAppSessionParams): Promise<void>;
|
|
22
46
|
//# sourceMappingURL=request-app-session.d.ts.map
|
|
@@ -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,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,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
|
|
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"}
|
|
@@ -39,9 +39,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
exports.requestAppSession = exports._requestAppSessionFactory = void 0;
|
|
40
40
|
var http_1 = require("../../utils/http");
|
|
41
41
|
/**
|
|
42
|
-
* Factory for the {@link requestAppSession}-function. See
|
|
42
|
+
* Factory for the {@link requestAppSession}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
43
43
|
* @typeparam T Return type of the {@link requestAppSession}-function. A corresponding transformFuntion has to be supplied.
|
|
44
|
-
* @category
|
|
44
|
+
* @category Authentication
|
|
45
45
|
*/
|
|
46
46
|
function _requestAppSessionFactory(httpRequestFunction, transformFunction) {
|
|
47
47
|
var _this = this;
|
|
@@ -67,12 +67,21 @@ function _requestAppSessionFactory(httpRequestFunction, transformFunction) {
|
|
|
67
67
|
}
|
|
68
68
|
exports._requestAppSessionFactory = _requestAppSessionFactory;
|
|
69
69
|
/**
|
|
70
|
-
* Request an
|
|
70
|
+
* Request an appSession for your app. The appSession will be sent via POST to your defined callback.
|
|
71
|
+
* **Do not forget to validate the appSessionId via the {@link validateAppSessionSignature}-function**
|
|
71
72
|
*
|
|
72
73
|
* ```typescript
|
|
73
|
-
*
|
|
74
|
+
* import { requestAppSession } from "@dvelop-sdk/identityprovider";
|
|
75
|
+
*
|
|
76
|
+
* await requestAppSession({
|
|
77
|
+
* systemBaseUri: "https://monster-ag.d-velop.cloud",
|
|
78
|
+
* authSessionId: "dQw4w9WgXcQ"
|
|
79
|
+
* }, {
|
|
80
|
+
* appName: "cda-compliance",
|
|
81
|
+
* callback: "/cda-compliance/appsession"
|
|
82
|
+
* });
|
|
74
83
|
* ```
|
|
75
|
-
* @category
|
|
84
|
+
* @category Authentication
|
|
76
85
|
*/
|
|
77
86
|
/* istanbul ignore next */
|
|
78
87
|
function requestAppSession(context, params) {
|
|
@@ -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;
|
|
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"}
|
package/lib/authentication/validate-app-session-signature/validate-app-session-signature.d.ts
CHANGED
|
@@ -1,31 +1,24 @@
|
|
|
1
|
+
import { AppSession } from "../request-app-session/request-app-session";
|
|
1
2
|
/**
|
|
2
|
-
*
|
|
3
|
+
* Indicates an invalid sign-value
|
|
3
4
|
* @category Error
|
|
4
5
|
*/
|
|
5
6
|
export declare class InvalidAppSessionSignatureError extends Error {
|
|
6
7
|
constructor();
|
|
7
8
|
}
|
|
8
9
|
/**
|
|
9
|
-
* 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).
|
|
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).
|
|
10
11
|
*
|
|
11
|
-
*
|
|
12
|
-
* @param {string} requestId The requestId that was sent when requesting an appSession
|
|
13
|
-
* @param {string} authSessionId The authSessionId provided to your callback
|
|
14
|
-
* @param {string} expire The expire value provided to your callback
|
|
15
|
-
* @param {string} sign The sign value provided to your callback
|
|
16
|
-
* @throws {@link InvalidAppSessionSignatureError} indicates that the sign value is not valid
|
|
17
|
-
*
|
|
18
|
-
* @category Authentication
|
|
19
|
-
*
|
|
20
|
-
* @example ```typescript
|
|
21
|
-
* acceptPostRequest(req: Request, res: Respone) {
|
|
12
|
+
* ```typescript
|
|
22
13
|
* try {
|
|
23
|
-
* validateAppSessionSignature("
|
|
14
|
+
* validateAppSessionSignature("cda-compliance", "qP-7GNoDJ5c", requestBody); //pass or error
|
|
24
15
|
* } catch(e) {
|
|
25
|
-
*
|
|
16
|
+
* // respond with 403 - Forbidden
|
|
26
17
|
* }
|
|
27
18
|
* }
|
|
28
19
|
* ```
|
|
20
|
+
* @throws {@link InvalidAppSessionSignatureError} indicates that the sign-value is not valid
|
|
21
|
+
* @category Authentication
|
|
29
22
|
*/
|
|
30
|
-
export declare function validateAppSessionSignature(appName: string, requestId: string,
|
|
23
|
+
export declare function validateAppSessionSignature(appName: string, requestId: string, appSession: AppSession): void;
|
|
31
24
|
//# sourceMappingURL=validate-app-session-signature.d.ts.map
|
package/lib/authentication/validate-app-session-signature/validate-app-session-signature.d.ts.map
CHANGED
|
@@ -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":"
|
|
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"}
|
|
@@ -18,7 +18,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
18
|
exports.validateAppSessionSignature = exports.InvalidAppSessionSignatureError = void 0;
|
|
19
19
|
var crypto_1 = require("crypto");
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* Indicates an invalid sign-value
|
|
22
22
|
* @category Error
|
|
23
23
|
*/
|
|
24
24
|
var InvalidAppSessionSignatureError = /** @class */ (function (_super) {
|
|
@@ -33,30 +33,22 @@ var InvalidAppSessionSignatureError = /** @class */ (function (_super) {
|
|
|
33
33
|
}(Error));
|
|
34
34
|
exports.InvalidAppSessionSignatureError = InvalidAppSessionSignatureError;
|
|
35
35
|
/**
|
|
36
|
-
* 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).
|
|
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).
|
|
37
37
|
*
|
|
38
|
-
*
|
|
39
|
-
* @param {string} requestId The requestId that was sent when requesting an appSession
|
|
40
|
-
* @param {string} authSessionId The authSessionId provided to your callback
|
|
41
|
-
* @param {string} expire The expire value provided to your callback
|
|
42
|
-
* @param {string} sign The sign value provided to your callback
|
|
43
|
-
* @throws {@link InvalidAppSessionSignatureError} indicates that the sign value is not valid
|
|
44
|
-
*
|
|
45
|
-
* @category Authentication
|
|
46
|
-
*
|
|
47
|
-
* @example ```typescript
|
|
48
|
-
* acceptPostRequest(req: Request, res: Respone) {
|
|
38
|
+
* ```typescript
|
|
49
39
|
* try {
|
|
50
|
-
* validateAppSessionSignature("
|
|
40
|
+
* validateAppSessionSignature("cda-compliance", "qP-7GNoDJ5c", requestBody); //pass or error
|
|
51
41
|
* } catch(e) {
|
|
52
|
-
*
|
|
42
|
+
* // respond with 403 - Forbidden
|
|
53
43
|
* }
|
|
54
44
|
* }
|
|
55
45
|
* ```
|
|
46
|
+
* @throws {@link InvalidAppSessionSignatureError} indicates that the sign-value is not valid
|
|
47
|
+
* @category Authentication
|
|
56
48
|
*/
|
|
57
|
-
function validateAppSessionSignature(appName, requestId,
|
|
58
|
-
var expectedSign = crypto_1.createHash("sha256").update(appName +
|
|
59
|
-
if (expectedSign !== sign) {
|
|
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) {
|
|
60
52
|
throw new InvalidAppSessionSignatureError();
|
|
61
53
|
}
|
|
62
54
|
}
|
package/lib/authentication/validate-app-session-signature/validate-app-session-signature.js.map
CHANGED
|
@@ -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;
|
|
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"}
|
|
@@ -32,17 +32,31 @@ export interface DvelopUser {
|
|
|
32
32
|
}[];
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* 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.
|
|
36
|
+
* @internal
|
|
37
|
+
* @category Authentication
|
|
38
|
+
*/
|
|
39
|
+
export declare function _validateAuthSessionIdDefaultTransformFunction(response: HttpResponse, _: DvelopContext): DvelopUser;
|
|
40
|
+
/**
|
|
41
|
+
* Factory for the {@link validateAuthSessionId}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
36
42
|
* @typeparam T Return type of the {@link validateAuthSessionId}-function. A corresponding transformFuntion has to be supplied.
|
|
37
|
-
* @category
|
|
43
|
+
* @category Authentication
|
|
38
44
|
*/
|
|
39
45
|
export declare function _validateAuthSessionIdFactory<T>(httpRequestFunction: (context: DvelopContext, config: HttpConfig) => Promise<HttpResponse>, transformFunction: (response: HttpResponse, context: DvelopContext) => T): (context: DvelopContext) => Promise<T>;
|
|
40
46
|
/**
|
|
41
47
|
* Validates an AuthSessionId and returns a {@link DvelopUser}.
|
|
42
48
|
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
49
|
+
* ```typescript
|
|
50
|
+
* import { validateAuthSessionId } from "@dvelop-sdk/identityprovider";
|
|
51
|
+
*
|
|
52
|
+
* const user: DvelopUser = await validateAuthSessionId({
|
|
53
|
+
* systemBaseUri: "https://monster-ag.d-velop.cloud",
|
|
54
|
+
* authSessionId: "dQw4w9WgXcQ"
|
|
55
|
+
* });
|
|
56
|
+
*
|
|
57
|
+
* console.log(user.displayName) //Mike Glotzkowski
|
|
45
58
|
* ```
|
|
59
|
+
* @category Authentication
|
|
46
60
|
*/
|
|
47
61
|
export declare function validateAuthSessionId(context: DvelopContext): Promise<DvelopUser>;
|
|
48
62
|
//# 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":"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;
|
|
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;AAED;;;;GAIG;AACH,wBAAgB,8CAA8C,CAAC,QAAQ,EAAE,YAAY,EAAE,CAAC,EAAE,aAAa,GAAG,UAAU,CAEnH;AAED;;;;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"}
|
|
@@ -39,7 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
exports.validateAuthSessionId = exports._validateAuthSessionIdFactory = exports._validateAuthSessionIdDefaultTransformFunction = void 0;
|
|
40
40
|
var http_1 = require("../../utils/http");
|
|
41
41
|
/**
|
|
42
|
-
* Default transform-function provided to the {@link validateAuthSessionId}-function.
|
|
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
43
|
* @internal
|
|
44
44
|
* @category Authentication
|
|
45
45
|
*/
|
|
@@ -48,9 +48,9 @@ function _validateAuthSessionIdDefaultTransformFunction(response, _) {
|
|
|
48
48
|
}
|
|
49
49
|
exports._validateAuthSessionIdDefaultTransformFunction = _validateAuthSessionIdDefaultTransformFunction;
|
|
50
50
|
/**
|
|
51
|
-
* Factory for the {@link validateAuthSessionId}-function. See
|
|
51
|
+
* Factory for the {@link validateAuthSessionId}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
52
52
|
* @typeparam T Return type of the {@link validateAuthSessionId}-function. A corresponding transformFuntion has to be supplied.
|
|
53
|
-
* @category
|
|
53
|
+
* @category Authentication
|
|
54
54
|
*/
|
|
55
55
|
function _validateAuthSessionIdFactory(httpRequestFunction, transformFunction) {
|
|
56
56
|
var _this = this;
|
|
@@ -74,9 +74,17 @@ exports._validateAuthSessionIdFactory = _validateAuthSessionIdFactory;
|
|
|
74
74
|
/**
|
|
75
75
|
* Validates an AuthSessionId and returns a {@link DvelopUser}.
|
|
76
76
|
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
77
|
+
* ```typescript
|
|
78
|
+
* import { validateAuthSessionId } from "@dvelop-sdk/identityprovider";
|
|
79
|
+
*
|
|
80
|
+
* const user: DvelopUser = await validateAuthSessionId({
|
|
81
|
+
* systemBaseUri: "https://monster-ag.d-velop.cloud",
|
|
82
|
+
* authSessionId: "dQw4w9WgXcQ"
|
|
83
|
+
* });
|
|
84
|
+
*
|
|
85
|
+
* console.log(user.displayName) //Mike Glotzkowski
|
|
79
86
|
* ```
|
|
87
|
+
* @category Authentication
|
|
80
88
|
*/
|
|
81
89
|
/* istanbul ignore next */
|
|
82
90
|
function validateAuthSessionId(context) {
|
|
@@ -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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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
|
|
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
|
@@ -23,13 +23,19 @@
|
|
|
23
23
|
</div>
|
|
24
24
|
* @module identityprovider
|
|
25
25
|
*/
|
|
26
|
+
import { DvelopUser } from "./authentication/validate-auth-session-id/validate-auth-session-id";
|
|
27
|
+
declare module "@dvelop-sdk/core" {
|
|
28
|
+
interface DvelopContext {
|
|
29
|
+
user?: DvelopUser;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
26
32
|
export { DvelopContext, BadInputError, UnauthorizedError, ForbiddenError, NotFoundError } from "@dvelop-sdk/core";
|
|
27
33
|
export { IdentityproviderError } from "./utils/http";
|
|
28
34
|
export * as internals from "./internal";
|
|
29
35
|
export { getAuthSession } from "./authentication/get-auth-session/get-auth-session";
|
|
30
|
-
export { getImpersonatedAuthSessionId } from "./authentication/get-impersonated-auth-session-id/get-impersonated-auth-session-id";
|
|
31
|
-
export { requestAppSession } from "./authentication/request-app-session/request-app-session";
|
|
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";
|
|
32
38
|
export { getLoginRedirectionUri } from "./authentication/get-login-redirection-uri/get-login-redirection-uri";
|
|
33
39
|
export { validateAppSessionSignature, InvalidAppSessionSignatureError } from "./authentication/validate-app-session-signature/validate-app-session-signature";
|
|
34
|
-
export { validateAuthSessionId } from "./authentication/validate-auth-session-id/validate-auth-session-id";
|
|
40
|
+
export { validateAuthSessionId, DvelopUser } from "./authentication/validate-auth-session-id/validate-auth-session-id";
|
|
35
41
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;
|
|
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,UAAU,CAAA;KAClB;CACF;AAGD,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,29 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
<div align="center">
|
|
4
|
-
<h1>@dvelop-sdk/identityprovider</h1>
|
|
5
|
-
<a href="https://www.npmjs.com/package/@dvelop-sdk/identityprovider">
|
|
6
|
-
<img alt="npm (scoped)" src="https://img.shields.io/npm/v/@dvelop-sdk/identityprovider?style=for-the-badge">
|
|
7
|
-
</a>
|
|
8
|
-
<a href="https://www.npmjs.com/package/@dvelop-sdk/identityprovider">
|
|
9
|
-
<img alt="npm bundle size (scoped)" src="https://img.shields.io/bundlephobia/min/@dvelop-sdk/identityprovider?style=for-the-badge">
|
|
10
|
-
</a>
|
|
11
|
-
<a href="https://github.com/d-velop/dvelop-sdk-node">
|
|
12
|
-
<img alt="GitHub" src="https://img.shields.io/badge/GitHub-dvelop--sdk--node-%23ff0844?logo=github&style=for-the-badge">
|
|
13
|
-
</a>
|
|
14
|
-
<a href="https://github.com/d-velop/dvelop-sdk-node/blob/master/LICENSE">
|
|
15
|
-
<img alt="license" src="https://img.shields.io/github/license/d-velop/dvelop-sdk-node?style=for-the-badge">
|
|
16
|
-
</a
|
|
17
|
-
</br>
|
|
18
|
-
<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>
|
|
19
|
-
<a href="https://d-velop.github.io/dvelop-sdk-node/modules/identityprovider.html"><strong>Explore the docs »</strong></a>
|
|
20
|
-
</br>
|
|
21
|
-
<a href="https://www.npmjs.com/package/@dvelop-sdk/identityprovider"><strong>Install via npm »</strong></a>
|
|
22
|
-
</br>
|
|
23
|
-
<a href="https://github.com/d-velop/dvelop-sdk-node"><strong>Check us out on GitHub »</strong></a>
|
|
24
|
-
</div>
|
|
25
|
-
* @module identityprovider
|
|
26
|
-
*/
|
|
27
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
28
3
|
if (k2 === undefined) k2 = k;
|
|
29
4
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
package/lib/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":";;;;;;;;;;;;;;;;;;;;;;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"}
|
package/lib/utils/http.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DvelopSdkError } from "@dvelop-sdk/core";
|
|
1
|
+
import { DvelopContext, DvelopHttpRequestConfig, DvelopHttpResponse, DvelopHttpClient, DvelopSdkError } from "@dvelop-sdk/core";
|
|
2
2
|
export { DvelopHttpRequestConfig as HttpConfig, DvelopHttpResponse as HttpResponse } from "@dvelop-sdk/core";
|
|
3
3
|
/**
|
|
4
4
|
* Generic Error for identityprovider-package.
|
|
@@ -9,4 +9,16 @@ export declare class IdentityproviderError extends DvelopSdkError {
|
|
|
9
9
|
originalError?: Error | undefined;
|
|
10
10
|
constructor(message: string, originalError?: Error | undefined);
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Factory used to create the default httpRequestFunction. Mostly used for HTTP-Error handling.
|
|
14
|
+
* @internal
|
|
15
|
+
* @category Http
|
|
16
|
+
*/
|
|
17
|
+
export declare function _defaultHttpRequestFunctionFactory(httpClient: DvelopHttpClient): (context: DvelopContext, config: DvelopHttpRequestConfig) => Promise<DvelopHttpResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* Default httpRequestFunction used in dms-package.
|
|
20
|
+
* @internal
|
|
21
|
+
* @category Http
|
|
22
|
+
*/
|
|
23
|
+
export declare function _defaultHttpRequestFunction(context: DvelopContext, config: DvelopHttpRequestConfig): Promise<DvelopHttpResponse>;
|
|
12
24
|
//# sourceMappingURL=http.d.ts.map
|
package/lib/utils/http.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/utils/http.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/utils/http.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,gBAAgB,EAAmG,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;AAED;;;;GAIG;AACH,wBAAgB,kCAAkC,CAAC,UAAU,EAAE,gBAAgB,GAAG,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,uBAAuB,KAAK,OAAO,CAAC,kBAAkB,CAAC,CA8BzK;AAED;;;;GAIG;AAEH,wBAAsB,2BAA2B,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAEtI"}
|
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.
|
|
4
|
+
"version": "3.1.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"types": "lib/index.d.ts",
|
|
@@ -23,9 +23,6 @@
|
|
|
23
23
|
"license": "license-checker --production --onlyAllow Apache-2.0;MIT;ISC;BSD-2-Clause;BSD-3-Clause"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@dvelop-sdk/
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
"gitHead": "0a3970080a611f6fb9b8f29ce2fb895726b5789d"
|
|
31
|
-
}
|
|
26
|
+
"@dvelop-sdk/core": "^2.0.0"
|
|
27
|
+
}
|
|
28
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
Apache License
|
|
2
|
-
Version 2.0, January 2004
|
|
3
|
-
http://www.apache.org/licenses/
|
|
4
|
-
|
|
5
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
-
|
|
7
|
-
1. Definitions.
|
|
8
|
-
|
|
9
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
-
|
|
12
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
-
the copyright owner that is granting the License.
|
|
14
|
-
|
|
15
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
-
other entities that control, are controlled by, or are under common
|
|
17
|
-
control with that entity. For the purposes of this definition,
|
|
18
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
-
direction or management of such entity, whether by contract or
|
|
20
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
-
|
|
23
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
-
exercising permissions granted by this License.
|
|
25
|
-
|
|
26
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
-
including but not limited to software source code, documentation
|
|
28
|
-
source, and configuration files.
|
|
29
|
-
|
|
30
|
-
"Object" form shall mean any form resulting from mechanical
|
|
31
|
-
transformation or translation of a Source form, including but
|
|
32
|
-
not limited to compiled object code, generated documentation,
|
|
33
|
-
and conversions to other media types.
|
|
34
|
-
|
|
35
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
-
Object form, made available under the License, as indicated by a
|
|
37
|
-
copyright notice that is included in or attached to the work
|
|
38
|
-
(an example is provided in the Appendix below).
|
|
39
|
-
|
|
40
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
-
form, that is based on (or derived from) the Work and for which the
|
|
42
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
-
of this License, Derivative Works shall not include works that remain
|
|
45
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
-
the Work and Derivative Works thereof.
|
|
47
|
-
|
|
48
|
-
"Contribution" shall mean any work of authorship, including
|
|
49
|
-
the original version of the Work and any modifications or additions
|
|
50
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
-
means any form of electronic, verbal, or written communication sent
|
|
55
|
-
to the Licensor or its representatives, including but not limited to
|
|
56
|
-
communication on electronic mailing lists, source code control systems,
|
|
57
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
-
excluding communication that is conspicuously marked or otherwise
|
|
60
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
-
|
|
62
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
-
subsequently incorporated within the Work.
|
|
65
|
-
|
|
66
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
-
Work and such Derivative Works in Source or Object form.
|
|
72
|
-
|
|
73
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
-
(except as stated in this section) patent license to make, have made,
|
|
77
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
-
where such license applies only to those patent claims licensable
|
|
79
|
-
by such Contributor that are necessarily infringed by their
|
|
80
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
-
institute patent litigation against any entity (including a
|
|
83
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
-
or contributory patent infringement, then any patent licenses
|
|
86
|
-
granted to You under this License for that Work shall terminate
|
|
87
|
-
as of the date such litigation is filed.
|
|
88
|
-
|
|
89
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
-
modifications, and in Source or Object form, provided that You
|
|
92
|
-
meet the following conditions:
|
|
93
|
-
|
|
94
|
-
(a) You must give any other recipients of the Work or
|
|
95
|
-
Derivative Works a copy of this License; and
|
|
96
|
-
|
|
97
|
-
(b) You must cause any modified files to carry prominent notices
|
|
98
|
-
stating that You changed the files; and
|
|
99
|
-
|
|
100
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
-
that You distribute, all copyright, patent, trademark, and
|
|
102
|
-
attribution notices from the Source form of the Work,
|
|
103
|
-
excluding those notices that do not pertain to any part of
|
|
104
|
-
the Derivative Works; and
|
|
105
|
-
|
|
106
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
-
distribution, then any Derivative Works that You distribute must
|
|
108
|
-
include a readable copy of the attribution notices contained
|
|
109
|
-
within such NOTICE file, excluding those notices that do not
|
|
110
|
-
pertain to any part of the Derivative Works, in at least one
|
|
111
|
-
of the following places: within a NOTICE text file distributed
|
|
112
|
-
as part of the Derivative Works; within the Source form or
|
|
113
|
-
documentation, if provided along with the Derivative Works; or,
|
|
114
|
-
within a display generated by the Derivative Works, if and
|
|
115
|
-
wherever such third-party notices normally appear. The contents
|
|
116
|
-
of the NOTICE file are for informational purposes only and
|
|
117
|
-
do not modify the License. You may add Your own attribution
|
|
118
|
-
notices within Derivative Works that You distribute, alongside
|
|
119
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
-
that such additional attribution notices cannot be construed
|
|
121
|
-
as modifying the License.
|
|
122
|
-
|
|
123
|
-
You may add Your own copyright statement to Your modifications and
|
|
124
|
-
may provide additional or different license terms and conditions
|
|
125
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
-
the conditions stated in this License.
|
|
129
|
-
|
|
130
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
-
this License, without any additional terms or conditions.
|
|
134
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
-
the terms of any separate license agreement you may have executed
|
|
136
|
-
with Licensor regarding such Contributions.
|
|
137
|
-
|
|
138
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
-
except as required for reasonable and customary use in describing the
|
|
141
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
-
|
|
143
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
-
implied, including, without limitation, any warranties or conditions
|
|
148
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
-
appropriateness of using or redistributing the Work and assume any
|
|
151
|
-
risks associated with Your exercise of permissions under this License.
|
|
152
|
-
|
|
153
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
-
unless required by applicable law (such as deliberate and grossly
|
|
156
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
-
liable to You for damages, including any direct, indirect, special,
|
|
158
|
-
incidental, or consequential damages of any character arising as a
|
|
159
|
-
result of this License or out of the use or inability to use the
|
|
160
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
-
other commercial damages or losses), even if such Contributor
|
|
163
|
-
has been advised of the possibility of such damages.
|
|
164
|
-
|
|
165
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
-
or other liability obligations and/or rights consistent with this
|
|
169
|
-
License. However, in accepting such obligations, You may act only
|
|
170
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
-
defend, and hold each Contributor harmless for any liability
|
|
173
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
-
of your accepting any such warranty or additional liability.
|
|
175
|
-
|
|
176
|
-
END OF TERMS AND CONDITIONS
|
|
177
|
-
|
|
178
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
-
|
|
180
|
-
To apply the Apache License to your work, attach the following
|
|
181
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
-
replaced with your own identifying information. (Don't include
|
|
183
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
-
comment syntax for the file format. We also recommend that a
|
|
185
|
-
file or class name and description of purpose be included on the
|
|
186
|
-
same "printed page" as the copyright notice for easier
|
|
187
|
-
identification within third-party archives.
|
|
188
|
-
|
|
189
|
-
Copyright [yyyy] [name of copyright owner]
|
|
190
|
-
|
|
191
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
-
you may not use this file except in compliance with the License.
|
|
193
|
-
You may obtain a copy of the License at
|
|
194
|
-
|
|
195
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
-
|
|
197
|
-
Unless required by applicable law or agreed to in writing, software
|
|
198
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
-
See the License for the specific language governing permissions and
|
|
201
|
-
limitations under the License.
|