w-web-sso 1.0.76 → 1.0.78

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/docs/WWebSso.html CHANGED
@@ -82,7 +82,7 @@ token發放/驗證/更新, 後台使用者/金鑰/IP管理與統計資訊, 以
82
82
 
83
83
  <dt class="tag-source">Source:</dt>
84
84
  <dd class="tag-source"><ul class="dummy"><li>
85
- <a href="server_WWebSso.mjs.html">server/WWebSso.mjs</a>, <a href="server_WWebSso.mjs.html#line99">line 99</a>
85
+ <a href="server_WWebSso.mjs.html">server/WWebSso.mjs</a>, <a href="server_WWebSso.mjs.html#line102">line 102</a>
86
86
  </li></ul></dd>
87
87
 
88
88
 
@@ -2207,6 +2207,126 @@ token發放/驗證/更新, 後台使用者/金鑰/IP管理與統計資訊, 以
2207
2207
 
2208
2208
 
2209
2209
 
2210
+ <tr>
2211
+
2212
+ <td class="name"><code>userRegistrationVerifySuccess</code></td>
2213
+
2214
+
2215
+ <td class="type">
2216
+
2217
+
2218
+ <span class="param-type">Object</span>
2219
+
2220
+
2221
+
2222
+
2223
+ </td>
2224
+
2225
+
2226
+ <td class="attributes">
2227
+
2228
+ &lt;optional><br>
2229
+
2230
+
2231
+
2232
+
2233
+
2234
+ </td>
2235
+
2236
+
2237
+
2238
+ <td class="default">
2239
+
2240
+ <code>{}</code>
2241
+
2242
+ </td>
2243
+
2244
+
2245
+ <td class="description last"><p>輸入註冊驗證結果頁「驗證成功」訊息物件,逐語系鍵(eng、cht)各自給文字或檔案路徑(檔案存在即讀檔作為文字),代入verifyEmailResultContent之{message},未給之語系採內建語系文字,預設{}</p></td>
2246
+ </tr>
2247
+
2248
+
2249
+
2250
+ <tr>
2251
+
2252
+ <td class="name"><code>verifyEmailAlreadyVerified</code></td>
2253
+
2254
+
2255
+ <td class="type">
2256
+
2257
+
2258
+ <span class="param-type">Object</span>
2259
+
2260
+
2261
+
2262
+
2263
+ </td>
2264
+
2265
+
2266
+ <td class="attributes">
2267
+
2268
+ &lt;optional><br>
2269
+
2270
+
2271
+
2272
+
2273
+
2274
+ </td>
2275
+
2276
+
2277
+
2278
+ <td class="default">
2279
+
2280
+ <code>{}</code>
2281
+
2282
+ </td>
2283
+
2284
+
2285
+ <td class="description last"><p>輸入註冊驗證結果頁「帳號已完成驗證」訊息物件,逐語系鍵(eng、cht)各自給文字或檔案路徑,代入{message},未給之語系採內建語系文字,預設{}</p></td>
2286
+ </tr>
2287
+
2288
+
2289
+
2290
+ <tr>
2291
+
2292
+ <td class="name"><code>verifyEmailInvalidToken</code></td>
2293
+
2294
+
2295
+ <td class="type">
2296
+
2297
+
2298
+ <span class="param-type">Object</span>
2299
+
2300
+
2301
+
2302
+
2303
+ </td>
2304
+
2305
+
2306
+ <td class="attributes">
2307
+
2308
+ &lt;optional><br>
2309
+
2310
+
2311
+
2312
+
2313
+
2314
+ </td>
2315
+
2316
+
2317
+
2318
+ <td class="default">
2319
+
2320
+ <code>{}</code>
2321
+
2322
+ </td>
2323
+
2324
+
2325
+ <td class="description last"><p>輸入註冊驗證結果頁「驗證連結無效或已失效」訊息物件,逐語系鍵(eng、cht)各自給文字或檔案路徑,代入{message},未給之語系採內建語系文字,預設{}</p></td>
2326
+ </tr>
2327
+
2328
+
2329
+
2210
2330
  <tr>
2211
2331
 
2212
2332
  <td class="name"><code>verifyEmailResultContent</code></td>
@@ -2334,7 +2454,7 @@ token發放/驗證/更新, 後台使用者/金鑰/IP管理與統計資訊, 以
2334
2454
  <br class="clear">
2335
2455
 
2336
2456
  <footer>
2337
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Mon Sep 14 2026 20:15:23 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
2457
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Wed Sep 16 2026 15:00:43 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
2338
2458
  </footer>
2339
2459
 
2340
2460
  <script>prettyPrint();</script>
package/docs/global.html CHANGED
@@ -311,7 +311,7 @@
311
311
  <br class="clear">
312
312
 
313
313
  <footer>
314
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Mon Sep 14 2026 20:15:23 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
314
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Wed Sep 16 2026 15:00:43 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
315
315
  </footer>
316
316
 
317
317
  <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.5</a> on Mon Sep 14 2026 20:15:23 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.5</a> on Wed Sep 16 2026 15:00: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>
@@ -140,6 +140,9 @@ import { defaultPasswordPolicy } from './defaultPasswordPolicy.mjs'
140
140
  * @param {Object} [optExt.regVerifyEmContent={}] 輸入註冊驗證信內容物件,逐語系鍵(eng、cht)各自給HTML字串或檔案路徑(檔案存在即讀檔作為內容),支援{sender}、{name}與{verifyUrl}置換符,未給之語系採內建語系文字,預設{}
141
141
  * @param {Object} [optExt.resetPwEmTitle={}] 輸入重設密碼通知信標題物件,逐語系鍵(eng、cht)各自給文字或檔案路徑(檔案存在即讀檔作為文字),未給之語系採內建語系文字,預設{}
142
142
  * @param {Object} [optExt.resetPwEmContent={}] 輸入重設密碼通知信內容物件,逐語系鍵(eng、cht)各自給HTML字串或檔案路徑(檔案存在即讀檔作為內容),支援{sender}、{name}、{account}與{newPassword}置換符,未給之語系採內建語系文字,預設{}
143
+ * @param {Object} [optExt.userRegistrationVerifySuccess={}] 輸入註冊驗證結果頁「驗證成功」訊息物件,逐語系鍵(eng、cht)各自給文字或檔案路徑(檔案存在即讀檔作為文字),代入verifyEmailResultContent之{message},未給之語系採內建語系文字,預設{}
144
+ * @param {Object} [optExt.verifyEmailAlreadyVerified={}] 輸入註冊驗證結果頁「帳號已完成驗證」訊息物件,逐語系鍵(eng、cht)各自給文字或檔案路徑,代入{message},未給之語系採內建語系文字,預設{}
145
+ * @param {Object} [optExt.verifyEmailInvalidToken={}] 輸入註冊驗證結果頁「驗證連結無效或已失效」訊息物件,逐語系鍵(eng、cht)各自給文字或檔案路徑,代入{message},未給之語系採內建語系文字,預設{}
143
146
  * @param {String} [optExt.verifyEmailResultContent=''] 輸入註冊驗證結果頁HTML字串或檔案路徑(檔案存在即讀檔作為內容),支援{title}與{message}置換符({message}依請求lang代入對應語系文字故單一模板即可),未給採pathTemplate之verifyEmailResult.html(缺檔回退套件內建模板),預設''
144
147
  * @returns {Object} 回傳物件,其內server為hapi伺服器實體,wsrv為w-converhp的伺服器事件物件,wsds為w-serv-webdata的伺服器事件物件,可監聽error事件
145
148
  */
@@ -459,13 +462,18 @@ function WWebSso(WOrm, url, db, pathSettings, optExt = {}) {
459
462
  return r
460
463
  }
461
464
 
462
- //kpLangExtEmail, 信件文字 settings 鍵(逐語系物件), 為安裝方於設定檔客製信件之正式介面;
463
- //讀到才逐語系覆寫 kpLang 內建同名鍵, 其後 kpLangExt 仍可全面覆寫(最終覆寫層, 供測試/CI)
465
+ //kpLangExtEmail, 後端專用文字之 settings 鍵(逐語系物件), 為安裝方於設定檔客製信件與註冊驗證結果頁文字之正式介面;
466
+ //讀到才逐語系覆寫 kpLang 內建同名鍵(未給之語系回退內建), 其後 kpLangExt 仍可全面覆寫(最終覆寫層, 整鍵取代, 供測試/CI)
464
467
  //chpwEmTitle/chpwEmContent: 變更密碼通知信({sender}/{name} 置換)
465
468
  //regVerifyEmTitle/regVerifyEmContent: 註冊驗證信({sender}/{name}/{verifyUrl} 置換)
466
469
  //resetPwEmTitle/resetPwEmContent: 重設密碼通知信({sender}/{name}/{account}/{newPassword} 置換)
470
+ //userRegistrationVerifySuccess/verifyEmailAlreadyVerified/verifyEmailInvalidToken: 註冊驗證結果頁(server-rendered)之三則訊息, 代入 verifyEmailResultContent 之 {message}
471
+ // (2026-09-15 部署方需求: 訊息須點名部署系統, 不宜改內建預設; 沿用本機制得逐語系回退與檔案路徑支援, kpLangExt 雖亦可覆寫但為整鍵取代須兩語系皆給)
467
472
  let kpLangExtEmail = {}
468
- let emTextKeys = ['chpwEmTitle', 'chpwEmContent', 'regVerifyEmTitle', 'regVerifyEmContent', 'resetPwEmTitle', 'resetPwEmContent']
473
+ let emTextKeys = [
474
+ 'chpwEmTitle', 'chpwEmContent', 'regVerifyEmTitle', 'regVerifyEmContent', 'resetPwEmTitle', 'resetPwEmContent',
475
+ 'userRegistrationVerifySuccess', 'verifyEmailAlreadyVerified', 'verifyEmailInvalidToken',
476
+ ]
469
477
  emTextKeys.forEach((k) => {
470
478
  let kp = getEmText(k)
471
479
  if (size(kp) > 0) {
@@ -476,7 +484,7 @@ function WWebSso(WOrm, url, db, pathSettings, optExt = {}) {
476
484
  //kpLang, 語系字典: 內建(procLang) → settings 信件文字鍵(逐語系覆寫) → kpLangExt(整鍵覆寫, 最終層)
477
485
  let kpLang = procLang({ kpLangExtEmail, kpLangExt, webName, webDescription })
478
486
 
479
- //kpLangWeb, 傳送前端之語系字典: 剔除僅後端寄信使用之信件文字鍵(前端零使用, 避免外洩後端內部文字與增肥前端酬載)
487
+ //kpLangWeb, 傳送前端之語系字典: 剔除僅後端使用之文字鍵(信件文字與 server-rendered 結果頁訊息; 前端零使用, 避免外洩後端內部文字與增肥前端酬載)
480
488
  let kpLangWeb = {}
481
489
  Object.keys(kpLang).forEach((lang) => {
482
490
  let kp = { ...kpLang[lang] }
@@ -1436,7 +1444,7 @@ export default WWebSso
1436
1444
  <br class="clear">
1437
1445
 
1438
1446
  <footer>
1439
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Mon Sep 14 2026 20:15:23 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
1447
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Wed Sep 16 2026 15:00:43 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
1440
1448
  </footer>
1441
1449
 
1442
1450
  <script>prettyPrint();</script>
@@ -182,7 +182,7 @@ export default {
182
182
  <br class="clear">
183
183
 
184
184
  <footer>
185
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Mon Sep 14 2026 20:15:23 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
185
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Wed Sep 16 2026 15:00:43 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
186
186
  </footer>
187
187
 
188
188
  <script>prettyPrint();</script>
@@ -98,7 +98,7 @@ export default httpGetJson
98
98
  <br class="clear">
99
99
 
100
100
  <footer>
101
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Mon Sep 14 2026 20:15:23 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
101
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Wed Sep 16 2026 15:00:43 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
102
102
  </footer>
103
103
 
104
104
  <script>prettyPrint();</script>
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "w-web-sso",
3
- "version": "1.0.76",
3
+ "version": "1.0.78",
4
4
  "main": "dist/w-web-sso.umd.js",
5
5
  "dependencies": {
6
6
  "json5": "^2.2.3",
7
- "w-aggrid-vue": "^2.0.86",
7
+ "w-aggrid-vue": "^2.0.87",
8
8
  "w-component-vue": "^2.5.15",
9
9
  "w-data-collector": "^1.0.37",
10
10
  "w-echarts-vue": "^1.0.11",
@@ -93,6 +93,9 @@ import { defaultPasswordPolicy } from './defaultPasswordPolicy.mjs'
93
93
  * @param {Object} [optExt.regVerifyEmContent={}] 輸入註冊驗證信內容物件,逐語系鍵(eng、cht)各自給HTML字串或檔案路徑(檔案存在即讀檔作為內容),支援{sender}、{name}與{verifyUrl}置換符,未給之語系採內建語系文字,預設{}
94
94
  * @param {Object} [optExt.resetPwEmTitle={}] 輸入重設密碼通知信標題物件,逐語系鍵(eng、cht)各自給文字或檔案路徑(檔案存在即讀檔作為文字),未給之語系採內建語系文字,預設{}
95
95
  * @param {Object} [optExt.resetPwEmContent={}] 輸入重設密碼通知信內容物件,逐語系鍵(eng、cht)各自給HTML字串或檔案路徑(檔案存在即讀檔作為內容),支援{sender}、{name}、{account}與{newPassword}置換符,未給之語系採內建語系文字,預設{}
96
+ * @param {Object} [optExt.userRegistrationVerifySuccess={}] 輸入註冊驗證結果頁「驗證成功」訊息物件,逐語系鍵(eng、cht)各自給文字或檔案路徑(檔案存在即讀檔作為文字),代入verifyEmailResultContent之{message},未給之語系採內建語系文字,預設{}
97
+ * @param {Object} [optExt.verifyEmailAlreadyVerified={}] 輸入註冊驗證結果頁「帳號已完成驗證」訊息物件,逐語系鍵(eng、cht)各自給文字或檔案路徑,代入{message},未給之語系採內建語系文字,預設{}
98
+ * @param {Object} [optExt.verifyEmailInvalidToken={}] 輸入註冊驗證結果頁「驗證連結無效或已失效」訊息物件,逐語系鍵(eng、cht)各自給文字或檔案路徑,代入{message},未給之語系採內建語系文字,預設{}
96
99
  * @param {String} [optExt.verifyEmailResultContent=''] 輸入註冊驗證結果頁HTML字串或檔案路徑(檔案存在即讀檔作為內容),支援{title}與{message}置換符({message}依請求lang代入對應語系文字故單一模板即可),未給採pathTemplate之verifyEmailResult.html(缺檔回退套件內建模板),預設''
97
100
  * @returns {Object} 回傳物件,其內server為hapi伺服器實體,wsrv為w-converhp的伺服器事件物件,wsds為w-serv-webdata的伺服器事件物件,可監聽error事件
98
101
  */
@@ -412,13 +415,18 @@ function WWebSso(WOrm, url, db, pathSettings, optExt = {}) {
412
415
  return r
413
416
  }
414
417
 
415
- //kpLangExtEmail, 信件文字 settings 鍵(逐語系物件), 為安裝方於設定檔客製信件之正式介面;
416
- //讀到才逐語系覆寫 kpLang 內建同名鍵, 其後 kpLangExt 仍可全面覆寫(最終覆寫層, 供測試/CI)
418
+ //kpLangExtEmail, 後端專用文字之 settings 鍵(逐語系物件), 為安裝方於設定檔客製信件與註冊驗證結果頁文字之正式介面;
419
+ //讀到才逐語系覆寫 kpLang 內建同名鍵(未給之語系回退內建), 其後 kpLangExt 仍可全面覆寫(最終覆寫層, 整鍵取代, 供測試/CI)
417
420
  //chpwEmTitle/chpwEmContent: 變更密碼通知信({sender}/{name} 置換)
418
421
  //regVerifyEmTitle/regVerifyEmContent: 註冊驗證信({sender}/{name}/{verifyUrl} 置換)
419
422
  //resetPwEmTitle/resetPwEmContent: 重設密碼通知信({sender}/{name}/{account}/{newPassword} 置換)
423
+ //userRegistrationVerifySuccess/verifyEmailAlreadyVerified/verifyEmailInvalidToken: 註冊驗證結果頁(server-rendered)之三則訊息, 代入 verifyEmailResultContent 之 {message}
424
+ // (2026-09-15 部署方需求: 訊息須點名部署系統, 不宜改內建預設; 沿用本機制得逐語系回退與檔案路徑支援, kpLangExt 雖亦可覆寫但為整鍵取代須兩語系皆給)
420
425
  let kpLangExtEmail = {}
421
- let emTextKeys = ['chpwEmTitle', 'chpwEmContent', 'regVerifyEmTitle', 'regVerifyEmContent', 'resetPwEmTitle', 'resetPwEmContent']
426
+ let emTextKeys = [
427
+ 'chpwEmTitle', 'chpwEmContent', 'regVerifyEmTitle', 'regVerifyEmContent', 'resetPwEmTitle', 'resetPwEmContent',
428
+ 'userRegistrationVerifySuccess', 'verifyEmailAlreadyVerified', 'verifyEmailInvalidToken',
429
+ ]
422
430
  emTextKeys.forEach((k) => {
423
431
  let kp = getEmText(k)
424
432
  if (size(kp) > 0) {
@@ -429,7 +437,7 @@ function WWebSso(WOrm, url, db, pathSettings, optExt = {}) {
429
437
  //kpLang, 語系字典: 內建(procLang) → settings 信件文字鍵(逐語系覆寫) → kpLangExt(整鍵覆寫, 最終層)
430
438
  let kpLang = procLang({ kpLangExtEmail, kpLangExt, webName, webDescription })
431
439
 
432
- //kpLangWeb, 傳送前端之語系字典: 剔除僅後端寄信使用之信件文字鍵(前端零使用, 避免外洩後端內部文字與增肥前端酬載)
440
+ //kpLangWeb, 傳送前端之語系字典: 剔除僅後端使用之文字鍵(信件文字與 server-rendered 結果頁訊息; 前端零使用, 避免外洩後端內部文字與增肥前端酬載)
433
441
  let kpLangWeb = {}
434
442
  Object.keys(kpLang).forEach((lang) => {
435
443
  let kp = { ...kpLang[lang] }
package/settings.json CHANGED
@@ -80,6 +80,19 @@
80
80
  eng: 'Dear {name},<br><br>The administrator has reset the password for your {sender} account.<br><br>Account: {account}<br>New password: <strong>{newPassword}</strong><br><br>Please log in with this password and immediately set your own new password upon login.<br><br>If you did not expect this change, please contact the administrator.<br><br>This is an automated notification.',
81
81
  cht: '使用者 {name} 您好:<br><br>管理員已重設您於「{sender}」的密碼。<br><br>帳號:{account}<br>新密碼:<strong>{newPassword}</strong><br><br>請以此密碼登入後,立即變更為您自己的新密碼。<br><br>若非您預期之操作,請聯繫管理員。<br><br>此為系統自動通知信件。',
82
82
  },
83
+ //註冊驗證結果頁之三則訊息(逐語系, 代入結果頁之 {message}), 各值可給文字或檔案路徑; 未給採內建語系文字. 部署方須點名系統時於此覆寫, 不改套件內建
84
+ userRegistrationVerifySuccess: { //驗證成功
85
+ eng: 'Email verified successfully. Please log in.',
86
+ cht: '電子郵件驗證成功,請登入。',
87
+ },
88
+ verifyEmailAlreadyVerified: { //帳號已完成驗證(重複點驗證連結)
89
+ eng: 'This account has already been verified.',
90
+ cht: '此帳號已完成驗證。',
91
+ },
92
+ verifyEmailInvalidToken: { //驗證連結無效或已失效
93
+ eng: 'Invalid or expired verification link.',
94
+ cht: '驗證連結無效或已失效。',
95
+ },
83
96
  //驗證結果頁, 可給HTML文字或檔案路徑(支援 {title}/{message} 置換); 未給採 pathTemplate 之 verifyEmailResult.html(缺檔回退套件內建)
84
97
  verifyEmailResultContent: '',
85
98
  pathTemplate: '', //自訂結果頁模板資料夾, 內放 verifyEmailResult.html 即覆寫內建