Skip to content

Commit 002a135

Browse files
authored
Change an optional scopes parameter to be required
The previous default None value would cause an exception in our code decorate_scope(). The fix is to change the previously optional scopes parameter to required. This kind of api surface change would usually be a breaking change, but in this case it is not, because the previous default value would cause exception so it was in fact required. FWIW, you can still explicitly use empty list [] as scope, and the response would contain id_token and refresh_token, but no access_token.
1 parent d79cc5a commit 002a135

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

msal/application.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ def acquire_token_by_device_flow(self, flow, **kwargs):
512512
**kwargs)
513513

514514
def acquire_token_by_username_password(
515-
self, username, password, scopes=None, **kwargs):
515+
self, username, password, scopes, **kwargs):
516516
"""Gets a token for a given resource via user credentails.
517517
518518
See this page for constraints of Username Password Flow.

0 commit comments

Comments
 (0)