Skip to content

Commit 15c194d

Browse files
committed
Rename enable_broker to allow_broker
1 parent ef7107f commit 15c194d

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

msal/application.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def __init__(
177177
# when we would eventually want to add this feature to PCA in future.
178178
exclude_scopes=None,
179179
http_cache=None,
180-
enable_broker=None,
180+
allow_broker=None,
181181
):
182182
"""Create an instance of application.
183183
@@ -414,7 +414,7 @@ def __init__(
414414
415415
New in version 1.16.0.
416416
417-
:param boolean enable_broker:
417+
:param boolean allow_broker:
418418
Brokers provide Single-Sign-On, device identification,
419419
and application identification verification.
420420
If this parameter is set to True,
@@ -501,9 +501,9 @@ def __init__(
501501
raise
502502
is_confidential_app = bool(
503503
isinstance(self, ConfidentialClientApplication) or self.client_credential)
504-
if is_confidential_app and enable_broker:
505-
raise ValueError("enable_broker=True is only supported in PublicClientApplication")
506-
self._enable_broker = (enable_broker and not is_confidential_app
504+
if is_confidential_app and allow_broker:
505+
raise ValueError("allow_broker=True is only supported in PublicClientApplication")
506+
self._enable_broker = (allow_broker and not is_confidential_app
507507
and sys.platform == "win32"
508508
and not self.authority.is_adfs and not self.authority._is_b2c)
509509

tests/msaltest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def main():
143143
header="Input authority (Note that MSA-PT apps would NOT use the /common authority)",
144144
accept_nonempty_string=True,
145145
),
146-
enable_broker=_input_boolean("Enable broker? (Azure CLI currently only supports @microsoft.com accounts when enabling broker)"),
146+
allow_broker=_input_boolean("Allow broker? (Azure CLI currently only supports @microsoft.com accounts when enabling broker)"),
147147
)
148148
if _input_boolean("Enable MSAL Python's DEBUG log?"):
149149
logging.basicConfig(level=logging.DEBUG)

tests/test_e2e.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def _build_app(cls,
155155
authority=authority,
156156
azure_region=azure_region,
157157
http_client=http_client or MinimalHttpClient(),
158-
enable_broker=broker_available # This way, we reuse same test cases, by run them with and without broker
158+
allow_broker=broker_available # This way, we reuse same test cases, by run them with and without broker
159159
and not client_credential,
160160
)
161161

0 commit comments

Comments
 (0)