@dvelop-sdk/identityprovider 3.0.2 → 3.0.3
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/lib/authentication/get-auth-session/get-auth-session.d.ts +14 -0
- package/lib/authentication/get-auth-session/get-auth-session.d.ts.map +1 -1
- package/lib/authentication/get-impersonated-auth-session-id/get-impersonated-auth-session-id.d.ts +14 -0
- package/lib/authentication/get-impersonated-auth-session-id/get-impersonated-auth-session-id.d.ts.map +1 -1
- package/lib/authentication/validate-auth-session-id/validate-auth-session-id.d.ts +6 -0
- package/lib/authentication/validate-auth-session-id/validate-auth-session-id.d.ts.map +1 -1
- package/lib/utils/http.d.ts +13 -1
- package/lib/utils/http.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
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
|
|
@@ -9,6 +10,19 @@ export interface AuthSession {
|
|
|
9
10
|
/** Date at which the AuthSessionId will no longer be valid. */
|
|
10
11
|
expire: Date;
|
|
11
12
|
}
|
|
13
|
+
/**
|
|
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>;
|
|
12
26
|
/**
|
|
13
27
|
* Returns an {@link AuthSession} based on an API-Key. API-Keys can be generated by d.velop cloud tenant administrators.
|
|
14
28
|
* **The AuthSessionId should be kept secret and never be publicly available.**
|
|
@@ -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"}
|
package/lib/authentication/get-impersonated-auth-session-id/get-impersonated-auth-session-id.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DvelopContext } from "@dvelop-sdk/core";
|
|
2
|
+
import { HttpConfig, HttpResponse } from "../../utils/http";
|
|
2
3
|
/**
|
|
3
4
|
* Parameters for the {@link getImpersonatedAuthSessionId}-function.
|
|
4
5
|
* @category Authentication
|
|
@@ -6,6 +7,19 @@ import { DvelopContext } from "@dvelop-sdk/core";
|
|
|
6
7
|
export interface GetImpersonatedAuthSessionIdParams {
|
|
7
8
|
userId: string;
|
|
8
9
|
}
|
|
10
|
+
/**
|
|
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>;
|
|
9
23
|
/**
|
|
10
24
|
* Returns an authSessionId for the given user. All requests with this authSessionId will be in that users name.
|
|
11
25
|
* **The AuthSessionId should be kept secret and never be publicly available.**
|
|
@@ -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,kBAAkB,CAAC;
|
|
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"}
|
|
@@ -31,6 +31,12 @@ export interface DvelopUser {
|
|
|
31
31
|
type?: string;
|
|
32
32
|
}[];
|
|
33
33
|
}
|
|
34
|
+
/**
|
|
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;
|
|
34
40
|
/**
|
|
35
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.
|
|
@@ -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"}
|
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.0.
|
|
4
|
+
"version": "3.0.3",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"types": "lib/index.d.ts",
|