w-web-sso 1.0.24 → 1.0.25
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/dist/w-web-sso.umd.js +1 -1
- package/docs/WWebSso.html +1 -1
- package/docs/WWebSso.mjs.html +1 -1
- package/docs/index.html +1 -1
- package/package.json +1 -1
- package/src/getUserByToken.mjs +4 -2
- package/src/getUserByUserId.mjs +4 -2
- package/src/getUsersByToken.mjs +4 -2
package/dist/w-web-sso.umd.js
CHANGED
package/docs/WWebSso.html
CHANGED
|
@@ -387,7 +387,7 @@
|
|
|
387
387
|
<br class="clear">
|
|
388
388
|
|
|
389
389
|
<footer>
|
|
390
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> on Wed Jul 23 2025
|
|
390
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> on Wed Jul 23 2025 16:44:43 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
391
391
|
</footer>
|
|
392
392
|
|
|
393
393
|
<script>prettyPrint();</script>
|
package/docs/WWebSso.mjs.html
CHANGED
|
@@ -1172,7 +1172,7 @@ export default WWebSso
|
|
|
1172
1172
|
<br class="clear">
|
|
1173
1173
|
|
|
1174
1174
|
<footer>
|
|
1175
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> on Wed Jul 23 2025
|
|
1175
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> on Wed Jul 23 2025 16:44:43 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
1176
1176
|
</footer>
|
|
1177
1177
|
|
|
1178
1178
|
<script>prettyPrint();</script>
|
package/docs/index.html
CHANGED
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
<br class="clear">
|
|
72
72
|
|
|
73
73
|
<footer>
|
|
74
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> on Wed Jul 23 2025
|
|
74
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> on Wed Jul 23 2025 16:44:43 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
75
75
|
</footer>
|
|
76
76
|
|
|
77
77
|
<script>prettyPrint();</script>
|
package/package.json
CHANGED
package/src/getUserByToken.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import ispm from 'wsemi/src/ispm.mjs'
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
async function getUserByToken(url, tokenSelf, tokenTar, opt = {}) {
|
|
10
|
-
//url: http://localhost:11007/api/getSsoUserInfor
|
|
10
|
+
//url: http://localhost:11007/api/getSsoUserInfor?token={sysToken}&key=token&value={token}
|
|
11
11
|
let errTemp = null
|
|
12
12
|
|
|
13
13
|
//check
|
|
@@ -25,7 +25,9 @@ async function getUserByToken(url, tokenSelf, tokenTar, opt = {}) {
|
|
|
25
25
|
let funConvertUser = get(opt, 'funConvertUser')
|
|
26
26
|
|
|
27
27
|
//url
|
|
28
|
-
|
|
28
|
+
if (url.indexOf('token={sysToken}') < 0 && url.indexOf('key=token') < 0 && url.indexOf('value={token}') < 0) {
|
|
29
|
+
return Promise.reject(`no 'token={sysToken}', 'key=token', 'value={token}' in url`)
|
|
30
|
+
}
|
|
29
31
|
url = url.replaceAll('{sysToken}', tokenSelf) //系統介接用ssoToken
|
|
30
32
|
url = url.replaceAll('{token}', tokenTar)
|
|
31
33
|
// console.log('getUserByToken: url', url)
|
package/src/getUserByUserId.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import ispm from 'wsemi/src/ispm.mjs'
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
async function getUserByUserId(url, tokenSelf, userIdTar, opt = {}) {
|
|
10
|
-
//url: http://localhost:11007/api/getSsoUserInfor
|
|
10
|
+
//url: http://localhost:11007/api/getSsoUserInfor?token={sysToken}&key=userId&value={userId}
|
|
11
11
|
let errTemp = null
|
|
12
12
|
|
|
13
13
|
//check
|
|
@@ -25,7 +25,9 @@ async function getUserByUserId(url, tokenSelf, userIdTar, opt = {}) {
|
|
|
25
25
|
let funConvertUser = get(opt, 'funConvertUser')
|
|
26
26
|
|
|
27
27
|
//url
|
|
28
|
-
|
|
28
|
+
if (url.indexOf('token={sysToken}') < 0 && url.indexOf('key=userId') < 0 && url.indexOf('value={userId}') < 0) {
|
|
29
|
+
return Promise.reject(`no 'token={sysToken}', 'key=userId', 'value={userId}' in url`)
|
|
30
|
+
}
|
|
29
31
|
url = url.replaceAll('{sysToken}', tokenSelf) //系統介接用ssoToken
|
|
30
32
|
url = url.replaceAll('{userId}', userIdTar)
|
|
31
33
|
// console.log('getUserByUserId: url', url)
|
package/src/getUsersByToken.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import pmSeries from 'wsemi/src/pmSeries.mjs'
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
async function getUsersByToken(url, tokenSelf, opt = {}) {
|
|
12
|
-
//url: http://localhost:11007/api/getSsoUsersList
|
|
12
|
+
//url: http://localhost:11007/api/getSsoUsersList?token={sysToken}
|
|
13
13
|
let errTemp = null
|
|
14
14
|
|
|
15
15
|
//check
|
|
@@ -24,7 +24,9 @@ async function getUsersByToken(url, tokenSelf, opt = {}) {
|
|
|
24
24
|
let funConvertUser = get(opt, 'funConvertUser')
|
|
25
25
|
|
|
26
26
|
//url
|
|
27
|
-
|
|
27
|
+
if (url.indexOf('token={sysToken}') < 0) {
|
|
28
|
+
return Promise.reject(`no 'token={sysToken}' in url`)
|
|
29
|
+
}
|
|
28
30
|
url = url.replaceAll('{sysToken}', tokenSelf) //系統介接用ssoToken
|
|
29
31
|
// console.log('getUsersByToken: url', url)
|
|
30
32
|
|