Skip to content

Commit fcf2143

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 65564c0 commit fcf2143

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
@@ -159,9 +159,13 @@ def _bound_params(
159159
return MappingProxyType(self.__bound_parameters)
160160

161161
@property
162-
def _required_auth_params(self) -> Mapping[str, list[str]]:
162+
def _required_authn_params(self) -> Mapping[str, list[str]]:
163163
return MappingProxyType(self.__required_authn_params)
164164

165+
@property
166+
def _required_authz_tokens(self) -> Sequence[str]:
167+
return tuple(self.__required_authz_tokens)
168+
165169
@property
166170
def _auth_service_token_getters(
167171
self,

0 commit comments

Comments
 (0)