8000 Not changing passed oauth_scope when auto-appending .default · RobStand/botbuilder-python@8baad85 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8baad85

Browse files
committed
Not changing passed oauth_scope when auto-appending .default
1 parent f19778d commit 8baad85

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

libraries/botframework-connector/botframework/connector/auth/microsoft_app_credentials.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,12 @@ def __init__(
3434
self.microsoft_app_password = password
3535
self.app = None
3636

37-
if self.oauth_scope and not self.oauth_scope.endswith("/.default"):
38-
self.oauth_scope += "/.default"
39-
self.scopes = [self.oauth_scope]
37+
# This check likely needs to be more nuanced than this. Assuming
38+
# "/.default" precludes other valid suffixes
39+
scope = self.oauth_scope
40+
if oauth_scope and not scope.endswith("/.default"):
41+
scope += "/.default"
42+
self.scopes = [scope]
4043

4144
@staticmethod
4245
def empty():

0 commit comments

Comments
 (0)
0