Skip to content

Commit 1c4148a

Browse files
authored
Merge branch 'dev' into release-1.34.0
2 parents 3edd99a + 2337a69 commit 1c4148a

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

.github/workflows/python-package.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,15 @@ jobs:
119119
- name: |
120120
Publish to TestPyPI when pushing to release-* branch.
121121
You better test with a1, a2, b1, b2 releases first.
122-
uses: pypa/gh-action-pypi-publish@v1.4.2
122+
uses: pypa/gh-action-pypi-publish@v1.13.0
123123
if: startsWith(github.ref, 'refs/heads/release-')
124124
with:
125125
user: __token__
126126
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
127127
repository_url: https://test.pypi.org/legacy/
128128
- name: Publish to PyPI when tagged
129129
if: startsWith(github.ref, 'refs/tags')
130-
uses: pypa/gh-action-pypi-publish@v1.4.2
130+
uses: pypa/gh-action-pypi-publish@v1.13.0
131131
with:
132132
user: __token__
133133
password: ${{ secrets.PYPI_API_TOKEN }}

msal/broker.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,20 @@ def _build_msal_runtime_auth_params(client_id, authority):
145145
params.set_additional_parameter("msal_client_ver", __version__)
146146
return params
147147

148+
def _set_redirect_uri_for_linux(params):
149+
if sys.platform == "linux":
150+
# This is required by Linux Java Broker to set a non-empty valid redirect_uri
151+
params.set_redirect_uri(
152+
"https://login.microsoftonline.com/common/oauth2/nativeclient"
153+
)
154+
148155
def _signin_silently(
149156
authority, client_id, scopes, correlation_id=None, claims=None,
150157
enable_msa_pt=False,
151158
auth_scheme=None,
152159
**kwargs):
153160
params = _build_msal_runtime_auth_params(client_id, authority)
161+
_set_redirect_uri_for_linux(params)
154162
params.set_requested_scopes(scopes)
155163
if claims:
156164
params.set_decoded_claims(claims)
@@ -240,6 +248,7 @@ def _acquire_token_silently(
240248
if account is None:
241249
return
242250
params = _build_msal_runtime_auth_params(client_id, authority)
251+
_set_redirect_uri_for_linux(params)
243252
params.set_requested_scopes(scopes)
244253
if claims:
245254
params.set_decoded_claims(claims)

tests/test_e2e.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -841,14 +841,14 @@ def test_user_account(self):
841841

842842

843843
class WorldWideTestCase(LabBasedTestCase):
844-
_ADFS_LABS_DECOMMISSIONED = "ADFS labs were decommissioned since July 2025 until further notice"
844+
_ADFS_LABS_UNAVAILABLE = "ADFS labs were temporarily down since July 2025 until further notice"
845845

846846
def test_aad_managed_user(self): # Pure cloud
847847
config = self.get_lab_user(usertype="cloud")
848848
config["password"] = self.get_lab_user_secret(config["lab_name"])
849849
self._test_username_password(**config)
850850

851-
@unittest.skip(_ADFS_LABS_DECOMMISSIONED)
851+
@unittest.skip(_ADFS_LABS_UNAVAILABLE)
852852
def test_adfs4_fed_user(self):
853853
config = self.get_lab_user(usertype="federated", federationProvider="ADFSv4")
854854
config["password"] = self.get_lab_user_secret(config["lab_name"])
@@ -866,7 +866,7 @@ def test_adfs2_fed_user(self):
866866
config["password"] = self.get_lab_user_secret(config["lab_name"])
867867
self._test_username_password(**config)
868868

869-
@unittest.skip(_ADFS_LABS_DECOMMISSIONED)
869+
@unittest.skip(_ADFS_LABS_UNAVAILABLE)
870870
def test_adfs2019_fed_user(self):
871871
try:
872872
config = self.get_lab_user(usertype="federated", federationProvider="ADFSv2019")
@@ -895,7 +895,7 @@ def test_msa_pt_app_signin_via_organizations_authority_without_login_hint(self):
895895
prompt="select_account", # In MSAL Python, this resets login_hint
896896
))
897897

898-
@unittest.skip(_ADFS_LABS_DECOMMISSIONED)
898+
@unittest.skip(_ADFS_LABS_UNAVAILABLE)
899899
def test_ropc_adfs2019_onprem(self):
900900
# Configuration is derived from https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/blob/4.7.0/tests/Microsoft.Identity.Test.Common/TestConstants.cs#L250-L259
901901
config = self.get_lab_user(usertype="onprem", federationProvider="ADFSv2019")
@@ -904,7 +904,7 @@ def test_ropc_adfs2019_onprem(self):
904904
config["password"] = self.get_lab_user_secret(config["lab_name"])
905905
self._test_username_password(**config)
906906

907-
@unittest.skip(_ADFS_LABS_DECOMMISSIONED)
907+
@unittest.skip(_ADFS_LABS_UNAVAILABLE)
908908
def test_adfs2019_onprem_acquire_token_by_auth_code(self):
909909
"""When prompted, you can manually login using this account:
910910
@@ -918,7 +918,7 @@ def test_adfs2019_onprem_acquire_token_by_auth_code(self):
918918
config["port"] = 8080
919919
self._test_acquire_token_by_auth_code(**config)
920920

921-
@unittest.skip(_ADFS_LABS_DECOMMISSIONED)
921+
@unittest.skip(_ADFS_LABS_UNAVAILABLE)
922922
def test_adfs2019_onprem_acquire_token_by_auth_code_flow(self):
923923
config = self.get_lab_user(usertype="onprem", federationProvider="ADFSv2019")
924924
self._test_acquire_token_by_auth_code_flow(**dict(
@@ -928,7 +928,7 @@ def test_adfs2019_onprem_acquire_token_by_auth_code_flow(self):
928928
port=8080,
929929
))
930930

931-
@unittest.skip(_ADFS_LABS_DECOMMISSIONED)
931+
@unittest.skip(_ADFS_LABS_UNAVAILABLE)
932932
def test_adfs2019_onprem_acquire_token_interactive(self):
933933
config = self.get_lab_user(usertype="onprem", federationProvider="ADFSv2019")
934934
self._test_acquire_token_interactive(**dict(

0 commit comments

Comments
 (0)