odsl-javascript-sdk 1.0.5 → 1.0.6
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 +1 -1
- package/src/odsl.js +4 -4
package/package.json
CHANGED
package/src/odsl.js
CHANGED
|
@@ -10,7 +10,7 @@ const msalConfig = {
|
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
module.exports = class
|
|
13
|
+
module.exports = class ODSL_SDK {
|
|
14
14
|
token = null;
|
|
15
15
|
// host = "https://odsl-dev.azurewebsites.net/api/";
|
|
16
16
|
host = "http://localhost:7071/api/";
|
|
@@ -24,7 +24,7 @@ module.exports = class ODSL {
|
|
|
24
24
|
await msalInstance.initialize();
|
|
25
25
|
console.log("Logging In");
|
|
26
26
|
const loginResponse = await msalInstance.loginPopup(loginRequest);
|
|
27
|
-
return new
|
|
27
|
+
return new ODSL_SDK(loginResponse);
|
|
28
28
|
} catch (err) {
|
|
29
29
|
console.log("Token Acquisition Failed: " + err);
|
|
30
30
|
}
|
|
@@ -37,13 +37,13 @@ module.exports = class ODSL {
|
|
|
37
37
|
let msalInstance = new ConfidentialClientApplication(config);
|
|
38
38
|
console.log("Logging In");
|
|
39
39
|
const loginResponse = await msalInstance.acquireTokenByClientCredential(loginRequest);
|
|
40
|
-
return new
|
|
40
|
+
return new ODSL_SDK(loginResponse);
|
|
41
41
|
} catch (err) {
|
|
42
42
|
console.log("Token Acquisition Failed: " + err);
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
static loginWithToken(token) {
|
|
46
|
-
return new
|
|
46
|
+
return new ODSL_SDK({accessToken:token});
|
|
47
47
|
}
|
|
48
48
|
get(service, source, id) {
|
|
49
49
|
try {
|