@stackfactor/client-api 1.1.107 → 1.1.108
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/security.js +22 -0
- package/package.json +1 -1
package/lib/security.js
CHANGED
|
@@ -43,7 +43,29 @@ const setAuthConnections = (data, authToken) => {
|
|
|
43
43
|
});
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
+
/**
|
|
47
|
+
* Synchronize the authentication connections with Auth0.
|
|
48
|
+
* @param {String} authToken
|
|
49
|
+
* @returns {Promise<Object>}
|
|
50
|
+
*/
|
|
51
|
+
const synchronizewithauth0 = (authToken) => {
|
|
52
|
+
return new Promise(function (resolve, reject) {
|
|
53
|
+
const sunchronizeRequest = client.get(
|
|
54
|
+
`api/v1/security/synchronizewithauth0`,
|
|
55
|
+
{ headers: { authorization: authToken } }
|
|
56
|
+
);
|
|
57
|
+
sunchronizeRequest
|
|
58
|
+
.then((response) => {
|
|
59
|
+
resolve(response.data);
|
|
60
|
+
})
|
|
61
|
+
.catch((error) => {
|
|
62
|
+
reject(error);
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
|
|
46
67
|
export default {
|
|
47
68
|
getAuthConnections,
|
|
48
69
|
setAuthConnections,
|
|
70
|
+
synchronizewithauth0,
|
|
49
71
|
};
|