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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * w-web-sso v1.0.24
2
+ * w-web-sso v1.0.25
3
3
  * (c) 2018-2021 yuda-lyu(semisphere)
4
4
  * Released under the MIT License.
5
5
  */
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 15:40:40 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
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>
@@ -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 15:40:40 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
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 15:40:40 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "w-web-sso",
3
- "version": "1.0.24",
3
+ "version": "1.0.25",
4
4
  "main": "dist/w-web-sso.umd.js",
5
5
  "dependencies": {
6
6
  "@mdi/js": "^7.4.47",
@@ -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
- url = `${url}?token={sysToken}&key=token&value={token}`
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)
@@ -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
- url = `${url}?token={sysToken}&key=userId&value={userId}`
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)
@@ -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
- url = `${url}?token={sysToken}`
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