Commit 36bfb16
committed
client, models: Simplify credential payload handling for PDF signing
- Refactored the credentials logic in `client.py` to remove redundant
validation and mapping code.
- Added a `_normalize_credentials` model validator in `_internal.py` to
handle credential normalization and enforce valid inputs.
- Updated test cases in `test_sign_pdf.py` to align with the new
credentials structure, consolidating `pfx` and `certificate` data
under a unified `credentials` field.
Assisted-by: Codex1 parent 503c84c commit 36bfb16
3 files changed
Lines changed: 34 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3091 | 3091 | | |
3092 | 3092 | | |
3093 | 3093 | | |
| 3094 | + | |
3094 | 3095 | | |
3095 | | - | |
3096 | 3096 | | |
3097 | 3097 | | |
3098 | 3098 | | |
| |||
4507 | 4507 | | |
4508 | 4508 | | |
4509 | 4509 | | |
| 4510 | + | |
4510 | 4511 | | |
4511 | | - | |
4512 | 4512 | | |
4513 | 4513 | | |
4514 | 4514 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
1157 | 1157 | | |
1158 | 1158 | | |
1159 | 1159 | | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
1160 | 1185 | | |
1161 | 1186 | | |
1162 | 1187 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | | - | |
| 76 | + | |
78 | 77 | | |
79 | 78 | | |
80 | 79 | | |
| |||
140 | 139 | | |
141 | 140 | | |
142 | 141 | | |
143 | | - | |
144 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
145 | 146 | | |
146 | 147 | | |
147 | 148 | | |
| |||
0 commit comments