fix: read pda authorization outside jwt

This commit is contained in:
2026-09-07 12:30:17 +08:00
parent 4f314fa3cf
commit 65962eb940
5 changed files with 57 additions and 25 deletions
+3 -2
View File
@@ -15,8 +15,9 @@ function tokens(version = 'old') {
const base = { user_id: 42, membership_id: 84, tenant_id: 0, app_code: 'PLATFORM', overseas_warehouse_id: 900, exp: future(), version }
return {
accessToken: jwt({ ...base, username: 'picker-42' }),
overseasAccessToken: jwt({ ...base, roles: [PDA_ROLE], authorities: [PDA_AUTHORITY] }),
refreshToken: `refresh-${version}`
overseasAccessToken: jwt(base),
refreshToken: `refresh-${version}`,
roles: [PDA_ROLE], authorities: [PDA_AUTHORITY]
}
}