Skip to content

Commit c74b5c5

Browse files
AutoPrFromHttpClientPythonAutoPrFromHttpClientPython
authored andcommitted
Regenerate for typespec-python (2025-03-26 05:24:34)
1 parent 786abba commit c74b5c5

4 files changed

Lines changed: 44 additions & 4 deletions

File tree

packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/_configuration.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,14 @@ def _configure(self, **kwargs: Any) -> None:
4848
self.authentication_policy = kwargs.get("authentication_policy")
4949
if self.credential and not self.authentication_policy:
5050
self.authentication_policy = policies.BearerTokenCredentialPolicy(
51-
self.credential, *self.credential_scopes, **kwargs
51+
self.credential,
52+
*self.credential_scopes,
53+
[
54+
{
55+
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
56+
"scopes": [{"value": "https://security.microsoft.com/.default"}],
57+
"type": "implicit",
58+
}
59+
],
60+
**kwargs
5261
)

packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/aio/_configuration.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,14 @@ def _configure(self, **kwargs: Any) -> None:
5050
self.authentication_policy = kwargs.get("authentication_policy")
5151
if self.credential and not self.authentication_policy:
5252
self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(
53-
self.credential, *self.credential_scopes, **kwargs
53+
self.credential,
54+
*self.credential_scopes,
55+
[
56+
{
57+
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
58+
"scopes": [{"value": "https://security.microsoft.com/.default"}],
59+
"type": "implicit",
60+
}
61+
],
62+
**kwargs
5463
)

packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/_configuration.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,18 @@ def _infer_policy(self, **kwargs):
5151
if isinstance(self.credential, ServiceKeyCredential):
5252
return policies.ServiceKeyCredentialPolicy(self.credential, "x-ms-api-key", **kwargs)
5353
if hasattr(self.credential, "get_token"):
54-
return policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
54+
return policies.BearerTokenCredentialPolicy(
55+
self.credential,
56+
*self.credential_scopes,
57+
[
58+
{
59+
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
60+
"scopes": [{"value": "https://security.microsoft.com/.default"}],
61+
"type": "implicit",
62+
}
63+
],
64+
**kwargs,
65+
)
5566
raise TypeError(f"Unsupported credential: {self.credential}")
5667

5768
def _configure(self, **kwargs: Any) -> None:

packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/aio/_configuration.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,18 @@ def _infer_policy(self, **kwargs):
5151
if isinstance(self.credential, ServiceKeyCredential):
5252
return policies.ServiceKeyCredentialPolicy(self.credential, "x-ms-api-key", **kwargs)
5353
if hasattr(self.credential, "get_token"):
54-
return policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
54+
return policies.AsyncBearerTokenCredentialPolicy(
55+
self.credential,
56+
*self.credential_scopes,
57+
[
58+
{
59+
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
60+
"scopes": [{"value": "https://security.microsoft.com/.default"}],
61+
"type": "implicit",
62+
}
63+
],
64+
**kwargs,
65+
)
5566
raise TypeError(f"Unsupported credential: {self.credential}")
5667

5768
def _configure(self, **kwargs: Any) -> None:

0 commit comments

Comments
 (0)