identity broker package - #32360
Conversation
pvaneck
left a comment
There was a problem hiding this comment.
I feel like we should keep code duplication to a minimum and use whatever we can from azure.identity.
How about importing InteractiveBrowserCredential from azure.identity and making that the parent class of the "extended" class and just override the things that need changing:
from azure.identity import InteractiveBrowserCredential as TraditionalInteractiveBrowserCredential
class InteractiveBrowserCredential(TraditionalInteractiveBrowserCredential):
"""Updated docstring"""
def __init__(self, **kwargs: Any) -> None:
self._allow_broker = kwargs.pop("allow_broker", False)
self._parent_window_handle = kwargs.pop("parent_window_handle", None)
self._enable_msa_passthrough = kwargs.pop("enable_msa_passthrough", False)
super().__init__(**kwargs)
def _get_app(self, **kwargs: Any) -> msal.ClientApplication:
...
@wrap_exceptions
def _request_token(self, *scopes: str, **kwargs: Any) -> Dict:
...
The problem is then we need to inherit from internal classes which we want to avoid. |
|
Co-authored-by: Paul Van Eck <paulvaneck@microsoft.com>
…_password.py Co-authored-by: Paul Van Eck <paulvaneck@microsoft.com>
…_password.py Co-authored-by: Paul Van Eck <paulvaneck@microsoft.com>
…ser.py Co-authored-by: Paul Van Eck <paulvaneck@microsoft.com>
…ser.py Co-authored-by: Paul Van Eck <paulvaneck@microsoft.com>
…ser.py Co-authored-by: Paul Van Eck <paulvaneck@microsoft.com>
I prefer to use a different name than InteractiveBrowserCredential. I will let architects decide the name. |
No description provided.