fix: align SMS expiry with PNVS valid time

This commit is contained in:
Codex
2026-07-04 00:47:36 +08:00
parent 0efdb0660c
commit 1c2ce38cea
3 changed files with 16 additions and 3 deletions

View File

@@ -18,7 +18,9 @@ assert.match(providerSource, /SendSmsVerifyCode/, 'PNVS provider should call Sen
assert.match(providerSource, /CheckSmsVerifyCode/, 'PNVS provider should call CheckSmsVerifyCode');
assert.match(providerSource, /VerifyResult.*PASS/s, 'PNVS verify should require provider PASS result');
assert.match(providerSource, /##code##/, 'PNVS provider should preserve Aliyun-generated code placeholder');
assert.match(providerSource, /ttlSeconds:\s*positiveInteger\(validTime,\s*input\.ttlSeconds\)/, 'PNVS provider should expose provider ValidTime as send result ttlSeconds');
assert.match(routeSource, /aliyun-pnvs/, 'auth routes should recognize aliyun-pnvs aliases');
assert.match(routeSource, /const ttlSeconds =[\s\S]*providerResult\.ttlSeconds[\s\S]*expireIn: ttlSeconds/, 'auth routes should persist and return provider-specific SMS TTL');
assert.match(routeSource, /replace\(\s*\/\[_\\s\]\/g,\s*'-'\s*\)/, 'auth routes should normalize underscore PNVS provider aliases before runtime selection');
assert.match(routeSource, /verification.*provider/s, 'auth routes should store provider verification mode');
assert.match(routeSource, /provider\.verify/, 'auth routes should delegate PNVS verification to provider');