@boxyhq/saml-jackson 0.2.1-beta.154 → 0.2.1-beta.155
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/controller/api.js +2 -2
- package/src/db/db.js +7 -1
- package/src/db/mem.js +1 -1
- package/src/db/mongo.js +1 -1
- package/src/db/redis.js +1 -1
- package/src/db/sql/sql.js +2 -2
package/package.json
CHANGED
package/src/controller/api.js
CHANGED
@@ -10,7 +10,7 @@ let configStore;
|
|
10
10
|
const extractHostName = (url) => {
|
11
11
|
try {
|
12
12
|
const pUrl = new URL(url);
|
13
|
-
if(pUrl.hostname.startsWith('www.')) {
|
13
|
+
if (pUrl.hostname.startsWith('www.')) {
|
14
14
|
return pUrl.hostname.substring(4);
|
15
15
|
}
|
16
16
|
return pUrl.hostname;
|
@@ -56,7 +56,7 @@ const config = async (body) => {
|
|
56
56
|
{
|
57
57
|
idpMetadata,
|
58
58
|
defaultRedirectUrl,
|
59
|
-
redirectUrl: JSON.parse(redirectUrl),
|
59
|
+
redirectUrl: JSON.parse(redirectUrl), // redirectUrl is a stringified array
|
60
60
|
tenant,
|
61
61
|
product,
|
62
62
|
clientID,
|
package/src/db/db.js
CHANGED
@@ -23,7 +23,13 @@ class DB {
|
|
23
23
|
throw new Error('secondary indexes not allow on a store with ttl');
|
24
24
|
}
|
25
25
|
|
26
|
-
return await this.db.put(
|
26
|
+
return await this.db.put(
|
27
|
+
namespace,
|
28
|
+
key,
|
29
|
+
JSON.stringify(val),
|
30
|
+
ttl,
|
31
|
+
...indexes
|
32
|
+
);
|
27
33
|
}
|
28
34
|
|
29
35
|
async delete(namespace, key) {
|
package/src/db/mem.js
CHANGED
package/src/db/mongo.js
CHANGED
package/src/db/redis.js
CHANGED
package/src/db/sql/sql.js
CHANGED
@@ -81,7 +81,7 @@ class Sql {
|
|
81
81
|
key: dbutils.key(namespace, key),
|
82
82
|
});
|
83
83
|
|
84
|
-
if (res) {
|
84
|
+
if (res && res.value) {
|
85
85
|
return JSON.parse(res.value);
|
86
86
|
}
|
87
87
|
|
@@ -107,7 +107,7 @@ class Sql {
|
|
107
107
|
async put(namespace, key, val, ttl = 0, ...indexes) {
|
108
108
|
await this.connection.transaction(async (transactionalEntityManager) => {
|
109
109
|
const dbKey = dbutils.key(namespace, key);
|
110
|
-
const store = new JacksonStore(dbKey,
|
110
|
+
const store = new JacksonStore(dbKey, val);
|
111
111
|
await transactionalEntityManager.save(store);
|
112
112
|
|
113
113
|
if (ttl) {
|