cidaas-javascript-sdk 2.2.6 → 2.2.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cidaas-javascript-sdk",
3
- "version": "2.2.6",
3
+ "version": "2.2.8",
4
4
  "author": "cidaas by Widas ID GmbH",
5
5
  "description": "Cidaas native javascript sdk",
6
6
  "license": "MIT",
@@ -27,7 +27,6 @@
27
27
  "registry": "https://registry.npmjs.org/"
28
28
  },
29
29
  "dependencies": {
30
- "@fingerprintjs/fingerprintjs": "^3.4.0",
31
30
  "@types/node": "^18.11.18",
32
31
  "crypto-js": "^4.1.1",
33
32
  "oidc-client": "^1.11.5"
@@ -2,7 +2,6 @@ var Authentication = require('../authentication');
2
2
  var CustomException = require('./exception');
3
3
  var Oidc = require('oidc-client');
4
4
  var CryptoJS = require("crypto-js");
5
- var fingerprint = require('@fingerprintjs/fingerprintjs')
6
5
 
7
6
 
8
7
  var code_verifier;
@@ -1942,28 +1941,26 @@ WebAuth.prototype.setAcceptLanguageHeader = function (acceptLanguage) {
1942
1941
  WebAuth.prototype.getDeviceInfo = function () {
1943
1942
  return new Promise(function (resolve, reject) {
1944
1943
  try {
1945
- const fpPromise = fingerprint.load();
1946
- var options = {fingerprint:"", userAgent:""};
1947
- (async () => {
1948
- const fp = await fpPromise;
1949
- const result = await fp.get();
1950
- options.fingerprint = result.visitorId
1951
- options.userAgent = window.navigator.userAgent
1952
- var http = new XMLHttpRequest();
1953
- var _serviceURL = window.webAuthSettings.authority + "/device-srv/deviceinfo";
1954
- http.onreadystatechange = function () {
1955
- if (http.readyState == 4) {
1956
- resolve(JSON.parse(http.responseText));
1944
+ const value = ('; '+document.cookie).split(`; cidaas_dr=`).pop().split(';')[0];
1945
+ if(!value) {
1946
+ (async () => {
1947
+ var options = {};
1948
+ options.userAgent = window.navigator.userAgent
1949
+ var http = new XMLHttpRequest();
1950
+ var _serviceURL = window.webAuthSettings.authority + "/device-srv/deviceinfo";
1951
+ http.onreadystatechange = function () {
1952
+ if (http.readyState == 4) {
1953
+ resolve(JSON.parse(http.responseText));
1954
+ }
1955
+ };
1956
+ http.open("POST", _serviceURL, true);
1957
+ http.setRequestHeader("Content-type", "application/json");
1958
+ if (window.localeSettings) {
1959
+ http.setRequestHeader("accept-language", window.localeSettings);
1957
1960
  }
1958
- };
1959
- http.open("POST", _serviceURL, true);
1960
- http.setRequestHeader("Content-type", "application/json");
1961
- if (window.localeSettings) {
1962
- http.setRequestHeader("accept-language", window.localeSettings);
1963
- }
1964
- http.send(JSON.stringify(options));
1965
- })();
1966
-
1961
+ http.send(JSON.stringify(options));
1962
+ })();
1963
+ }
1967
1964
  } catch (ex) {
1968
1965
  reject(ex);
1969
1966
  }
@@ -27,6 +27,8 @@ declare class WebAuth {
27
27
  getTenantInfo(): Promise<any>;
28
28
  logoutUser(options: any): void;
29
29
  getClientInfo(options: any): Promise<any>;
30
+ getDevicesInfo(options: any): Promise<any>;
31
+ deleteDevice(options: any): Promise<any>;
30
32
  getRegistrationSetup(options: any): Promise<any>;
31
33
  register(options: any, headers: any): Promise<any>;
32
34
  getInviteUserDetails(options: any): Promise<any>;
@@ -134,5 +136,5 @@ declare class WebAuth {
134
136
  deviceCodeVerify(code: any): void;
135
137
  userCheckExists(options: any): Promise<any>;
136
138
  setAcceptLanguageHeader(acceptLanguage: any): void;
137
- getDeviceInfo(options: any): Promise<any>;
139
+ getDeviceInfo(): Promise<any>;
138
140
  }
package/CHANGELOG.md DELETED
@@ -1,7 +0,0 @@
1
- ## [2.2.6](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/compare/v2.2.5...v2.2.6) (2023-02-06)
2
-
3
-
4
- ### Bug Fixes
5
-
6
- * added fingerprintjs ([489c85a](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/489c85addc744aa9773a5dc6ca37dded5e2bceae))
7
- * added fingerprintjs ([9be8b76](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/9be8b76b45d1ceee33ba9eca74c3acd2899a3be3))