Skip to content

Commit 3a5990a

Browse files
committed
No longer need to fake device code flow endpoint
1 parent b081f3d commit 3a5990a

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

msal/application.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
import functools
22
import json
33
import time
4-
try: # Python 2
5-
from urlparse import urljoin
6-
except: # Python 3
7-
from urllib.parse import urljoin
84
import logging
95
import sys
106
import warnings
@@ -723,9 +719,7 @@ def _build_client(self, client_credential, authority, skip_regional_client=False
723719
central_configuration = {
724720
"authorization_endpoint": authority.authorization_endpoint,
725721
"token_endpoint": authority.token_endpoint,
726-
"device_authorization_endpoint":
727-
authority.device_authorization_endpoint or
728-
urljoin(authority.token_endpoint, "devicecode"),
722+
"device_authorization_endpoint": authority.device_authorization_endpoint,
729723
}
730724
central_client = _ClientWithCcsRoutingInfo(
731725
central_configuration,
@@ -749,8 +743,7 @@ def _build_client(self, client_credential, authority, skip_regional_client=False
749743
"authorization_endpoint": regional_authority.authorization_endpoint,
750744
"token_endpoint": regional_authority.token_endpoint,
751745
"device_authorization_endpoint":
752-
regional_authority.device_authorization_endpoint or
753-
urljoin(regional_authority.token_endpoint, "devicecode"),
746+
regional_authority.device_authorization_endpoint,
754747
}
755748
regional_client = _ClientWithCcsRoutingInfo(
756749
regional_configuration,

0 commit comments

Comments
 (0)