Skip to content

Commit 3fe904a

Browse files
committed
fix(toolbox-core): Expose authz token requirements from ToolboxTool
This is used in a future PR where we inspect this protected value from the wrapper classes to implement self-authenticated tools.
1 parent 4237fff commit 3fe904a

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

packages/toolbox-core/src/toolbox_core/sync_tool.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,12 @@ def _bound_params(
108108
return self.__async_tool._bound_params
109109

110110
@property
111-
def _required_auth_params(self) -> Mapping[str, list[str]]:
112-
return self.__async_tool._required_auth_params
111+
def _required_authn_params(self) -> Mapping[str, list[str]]:
112+
return self.__async_tool._required_authn_params
113+
114+
@property
115+
def _required_authz_tokens(self) -> Sequence[str]:
116+
return self.__async_tool._required_authz_tokens
113117

114118
@property
115119
def _auth_service_token_getters(

packages/toolbox-core/src/toolbox_core/tool.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,13 @@ def _bound_params(
155155
return MappingProxyType(self.__bound_parameters)
156156

157157
@property
158-
def _required_auth_params(self) -> Mapping[str, list[str]]:
158+
def _required_authn_params(self) -> Mapping[str, list[str]]:
159159
return MappingProxyType(self.__required_authn_params)
160160

161+
@property
162+
def _required_authz_tokens(self) -> Sequence[str]:
163+
return tuple(self.__required_authz_tokens)
164+
161165
@property
162166
def _auth_service_token_getters(
163167
self,

0 commit comments

Comments
 (0)