cidaas-javascript-sdk 3.1.2 → 3.1.4
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/CHANGELOG.md +2 -2
- package/README.md +0 -1
- package/dist/authentication/index.d.ts +55 -0
- package/{src/main/authentication/index.ts → dist/authentication/index.js} +127 -88
- package/dist/index.d.ts +3 -0
- package/dist/index.js +7 -0
- package/dist/web-auth/ConsentService.d.ts +59 -0
- package/dist/web-auth/ConsentService.js +73 -0
- package/dist/web-auth/Entities.d.ts +533 -0
- package/dist/web-auth/Entities.js +78 -0
- package/dist/web-auth/Helper.d.ts +24 -0
- package/dist/web-auth/Helper.js +89 -0
- package/dist/web-auth/LoginService.d.ts +103 -0
- package/dist/web-auth/LoginService.js +248 -0
- package/dist/web-auth/TokenService.d.ts +48 -0
- package/dist/web-auth/TokenService.js +160 -0
- package/dist/web-auth/UserService.d.ts +143 -0
- package/dist/web-auth/UserService.js +311 -0
- package/dist/web-auth/VerificationService.d.ts +125 -0
- package/dist/web-auth/VerificationService.js +251 -0
- package/dist/web-auth/WebAuth.d.ts +882 -0
- package/dist/web-auth/WebAuth.js +1570 -0
- package/package.json +7 -8
- package/src/main/global.d.ts +0 -10
- package/src/main/index.ts +0 -6
- package/src/main/web-auth/ConsentService.ts +0 -76
- package/src/main/web-auth/Entities.ts +0 -610
- package/src/main/web-auth/Helper.ts +0 -75
- package/src/main/web-auth/LoginService.ts +0 -249
- package/src/main/web-auth/TokenService.ts +0 -106
- package/src/main/web-auth/UserService.ts +0 -297
- package/src/main/web-auth/VerificationService.ts +0 -247
- package/src/main/web-auth/WebAuth.ts +0 -1516
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cidaas-javascript-sdk",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.4",
|
|
4
4
|
"author": "cidaas by Widas ID GmbH",
|
|
5
5
|
"description": "Cidaas native javascript sdk",
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"main": "
|
|
8
|
-
"types": "
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
9
|
"testEnvironment": "jsdom",
|
|
10
10
|
"engine": {
|
|
11
11
|
"node": ">=8.9.10"
|
|
@@ -17,8 +17,7 @@
|
|
|
17
17
|
"test:coverage": "jest --coverage --env=jsdom"
|
|
18
18
|
},
|
|
19
19
|
"files": [
|
|
20
|
-
"
|
|
21
|
-
"types",
|
|
20
|
+
"dist",
|
|
22
21
|
"README.md",
|
|
23
22
|
"license.MD",
|
|
24
23
|
"Changelogs.md"
|
|
@@ -29,8 +28,6 @@
|
|
|
29
28
|
"dependencies": {
|
|
30
29
|
"@fingerprintjs/fingerprintjs": "^3.4.0",
|
|
31
30
|
"@toolz/is-a-regular-object": "^1.0.1",
|
|
32
|
-
"@types/crypto-js": "^4.1.1",
|
|
33
|
-
"@types/jest": "^29.5.3",
|
|
34
31
|
"crypto-js": "^4.1.1",
|
|
35
32
|
"oidc-client-ts": "^2.2.1"
|
|
36
33
|
},
|
|
@@ -38,9 +35,11 @@
|
|
|
38
35
|
"@babel/core": "^7.22.9",
|
|
39
36
|
"@babel/preset-env": "^7.22.9",
|
|
40
37
|
"@babel/preset-typescript": "^7.22.5",
|
|
41
|
-
"babel-jest": "^29.6.1",
|
|
42
38
|
"@jest/globals": "^29.6.1",
|
|
39
|
+
"@types/crypto-js": "^4.1.2",
|
|
40
|
+
"@types/jest": "^29.5.4",
|
|
43
41
|
"@types/mocha": "5.2.7",
|
|
42
|
+
"babel-jest": "^29.6.1",
|
|
44
43
|
"jest": "^29.6.1",
|
|
45
44
|
"jest-environment-jsdom": "^29.6.1",
|
|
46
45
|
"jsdom": "^22.1.0",
|
package/src/main/global.d.ts
DELETED
package/src/main/index.ts
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { IConsentAcceptEntity } from "./Entities"
|
|
2
|
-
import { Helper } from "./Helper";
|
|
3
|
-
|
|
4
|
-
export namespace ConsentService {
|
|
5
|
-
/**
|
|
6
|
-
* get user consent details
|
|
7
|
-
* @param options
|
|
8
|
-
* @returns
|
|
9
|
-
*/
|
|
10
|
-
export function getConsentDetailsV2(options: {
|
|
11
|
-
consent_id: string;
|
|
12
|
-
consent_version_id: string;
|
|
13
|
-
sub: string;
|
|
14
|
-
}) {
|
|
15
|
-
var _serviceURL = window.webAuthSettings.authority + "/consent-management-srv/v2/consent/usage/public/info";
|
|
16
|
-
return Helper.createPostPromise(options, _serviceURL, false,"POST");
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* accept constn v2
|
|
21
|
-
* @param options
|
|
22
|
-
* @returns
|
|
23
|
-
*/
|
|
24
|
-
export function acceptConsentV2(options: IConsentAcceptEntity) {
|
|
25
|
-
var _serviceURL = window.webAuthSettings.authority + "/consent-management-srv/v2/consent/usage/accept";
|
|
26
|
-
return Helper.createPostPromise(options, _serviceURL, false, "POST" );
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* get scope consent version details
|
|
31
|
-
* @param options
|
|
32
|
-
* @returns
|
|
33
|
-
*/
|
|
34
|
-
export function getScopeConsentVersionDetailsV2(options: {
|
|
35
|
-
scopeid: string;
|
|
36
|
-
locale: string;
|
|
37
|
-
access_token: string;
|
|
38
|
-
}) {
|
|
39
|
-
const _serviceURL = window.webAuthSettings.authority + "/consent-management-srv/v2/consent/versions/details/" + options.scopeid + "?locale=" + options.locale;
|
|
40
|
-
return Helper.createPostPromise(undefined, _serviceURL,false, "GET", options.access_token);
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* accept scope Consent
|
|
45
|
-
* @param options
|
|
46
|
-
* @returns
|
|
47
|
-
*/
|
|
48
|
-
export function acceptScopeConsent(options: {
|
|
49
|
-
client_id: string;
|
|
50
|
-
sub: string;
|
|
51
|
-
scopes: string[];
|
|
52
|
-
}) {
|
|
53
|
-
var _serviceURL = window.webAuthSettings.authority + "/consent-management-srv/consent/scope/accept";
|
|
54
|
-
return Helper.createPostPromise(options, _serviceURL, false, "POST");
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* accept claim Consent
|
|
59
|
-
* @param options
|
|
60
|
-
* @returns
|
|
61
|
-
*/
|
|
62
|
-
export function acceptClaimConsent(options: { client_id: string; sub: string; accepted_claims: string[]; }) {
|
|
63
|
-
var _serviceURL = window.webAuthSettings.authority + "/consent-management-srv/consent/claim/accept";
|
|
64
|
-
return Helper.createPostPromise(options, _serviceURL, false, "POST");
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* revoke claim Consent
|
|
69
|
-
* @param options
|
|
70
|
-
* @returns
|
|
71
|
-
*/
|
|
72
|
-
export function revokeClaimConsent(options: { client_id: string; sub: string; revoked_claims: string[]; }) {
|
|
73
|
-
var _serviceURL = window.webAuthSettings.authority + "/consent-management-srv/consent/claim/revoke";
|
|
74
|
-
return Helper.createPostPromise(options, _serviceURL, false, "POST");
|
|
75
|
-
};
|
|
76
|
-
}
|