@@ -1815,11 +1815,7 @@ def acquire_token_by_username_password(
18151815 # because this ROPC won't work with MSA account anyway.
18161816 auth_scheme = None ,
18171817 ** kwargs ):
1818- """
1819- [Deprecated] This API is deprecated for PublicClientApplication(PCA) flows and will be removed in a future release. Use a more secure flow instead.
1820- Migration guide: https://aka.ms/msal-ropc-migration
1821-
1822- Gets a token for a given resource via user credentials.
1818+ """Gets a token for a given resource via user credentials.
18231819
18241820 See this page for constraints of Username Password Flow.
18251821 https://github.com/AzureAD/microsoft-authentication-library-for-python/wiki/Username-Password-Authentication
@@ -1844,12 +1840,17 @@ def acquire_token_by_username_password(
18441840
18451841 - A successful response would contain "access_token" key,
18461842 - an error response would contain "error" and usually "error_description".
1843+
1844+ [Deprecated] This API is deprecated for public client flows and will be removed in a future release.
1845+ Use a more secure flow instead.
1846+ Migration guide: https://aka.ms/msal-ropc-migration
1847+
18471848 """
18481849 is_confidential_app = self .client_credential or isinstance (
18491850 self , ConfidentialClientApplication )
18501851 if not is_confidential_app :
1851- warnings .warn ("This API has been deprecated for public client flows , please use a more secure flow. " \
1852- " See https://aka.ms/msal-ropc-migration for migration guidance" , DeprecationWarning )
1852+ warnings .warn (""" This API has been deprecated, please use a more secure flow.
1853+ See https://aka.ms/msal-ropc-migration for migration guidance"" " , DeprecationWarning )
18531854 claims = _merge_claims_challenge_and_capabilities (
18541855 self ._client_capabilities , claims_challenge )
18551856 if self ._enable_broker and sys .platform in ("win32" , "darwin" ):
0 commit comments