Commit 6a35aab
feat: Add auth_tools support and fix test infrastructure (#66)
* Add auth_tools field for selective authentication in OpenAPI tool generation
- Add auth_tools field to HttpCallTemplate for tool-specific authentication
- Implement compatibility checking between OpenAPI security schemes and auth_tools
- Apply real credentials when compatible, use placeholders when incompatible
- Preserve existing behavior for public endpoints (no auth required)
- Add comprehensive test coverage for all authentication scenarios
- Update documentation with auth_tools examples and usage
- Maintain full backward compatibility
* Update implementation files and documentation for auth_tools feature
- Update HttpCallTemplate, HttpCommunicationProtocol, and OpenApiConverter
- Add auth_tools examples to README.md
- Update existing tests for new auth_tools parameter
- Add integration test for auth_tools field functionality
* fix: resolve pytest fixture dependency issue in HTTP tests
- Fix aiohttp_client fixture usage by properly injecting app dependency
- Ensure all test fixtures receive required parameters correctly
- All 153 tests now pass without fixture conflicts
* feat: add auth_tools support to text plugin
- Add auth_tools field to TextCallTemplate for OpenAPI-generated tools
- Pass auth_tools to OpenApiConverter when processing local OpenAPI specs
- Update documentation to reflect new authentication capabilities
- Add test coverage for auth_tools functionality
- Maintains backward compatibility (auth_tools is optional)
This allows text plugin to apply authentication to tools generated from
local OpenAPI specifications, enabling secure API calls while keeping
file access authentication-free.
* fix: add proper serialization/validation for auth and auth_tools fields
- Add field_serializer and field_validator for auth_tools in TextCallTemplate
- Add field_serializer and field_validator for both auth and auth_tools in HttpCallTemplate
- Use AuthSerializer.validate_dict() for proper dict-to-Auth conversion
- Add comprehensive test coverage for auth_tools serialization
- Ensures dict configurations preserve all critical authentication fields
- All 155 tests pass with proper field validation
* Update README.md
---------
Co-authored-by: Razvan Radulescu <43811028+h3xxit@users.noreply.github.com>1 parent aa448aa commit 6a35aab
File tree
11 files changed
+557
-60
lines changed- plugins/communication_protocols
- http
- src/utcp_http
- tests
- text
- src/utcp_text
- tests
11 files changed
+557
-60
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
379 | | - | |
| 379 | + | |
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
384 | 384 | | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
385 | 391 | | |
386 | 392 | | |
387 | 393 | | |
| |||
473 | 479 | | |
474 | 480 | | |
475 | 481 | | |
476 | | - | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
477 | 489 | | |
478 | 490 | | |
479 | 491 | | |
| |||
569 | 581 | | |
570 | 582 | | |
571 | 583 | | |
572 | | - | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
573 | 591 | | |
574 | 592 | | |
575 | 593 | | |
| |||
579 | 597 | | |
580 | 598 | | |
581 | 599 | | |
| 600 | + | |
582 | 601 | | |
583 | 602 | | |
584 | 603 | | |
| |||
Lines changed: 50 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
43 | 49 | | |
44 | 50 | | |
45 | 51 | | |
| |||
85 | 91 | | |
86 | 92 | | |
87 | 93 | | |
88 | | - | |
| 94 | + | |
| 95 | + | |
89 | 96 | | |
90 | 97 | | |
91 | 98 | | |
| |||
96 | 103 | | |
97 | 104 | | |
98 | 105 | | |
| 106 | + | |
99 | 107 | | |
100 | 108 | | |
101 | 109 | | |
102 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
103 | 149 | | |
104 | 150 | | |
105 | 151 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | | - | |
| 200 | + | |
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
| |||
Lines changed: 49 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| 99 | + | |
| 100 | + | |
99 | 101 | | |
100 | 102 | | |
101 | 103 | | |
| 104 | + | |
102 | 105 | | |
103 | 106 | | |
104 | 107 | | |
| |||
160 | 163 | | |
161 | 164 | | |
162 | 165 | | |
163 | | - | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
164 | 170 | | |
165 | 171 | | |
166 | 172 | | |
167 | 173 | | |
168 | 174 | | |
169 | 175 | | |
170 | 176 | | |
171 | | - | |
| 177 | + | |
172 | 178 | | |
173 | 179 | | |
174 | 180 | | |
175 | | - | |
| 181 | + | |
176 | 182 | | |
177 | 183 | | |
178 | 184 | | |
| |||
181 | 187 | | |
182 | 188 | | |
183 | 189 | | |
184 | | - | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
185 | 197 | | |
186 | 198 | | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
187 | 231 | | |
188 | 232 | | |
189 | 233 | | |
| |||
0 commit comments