8000 fix: disable always_use_jwt_access (#181) · googleapis/python-automl@160a7ad · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Dec 31, 2023. It is now read-only.

Commit 160a7ad

Browse files
fix: disable always_use_jwt_access (#181)
fix: disable always_use_jwt_access Committer: @busunkim96 PiperOrigin-RevId: 382142900 Source-Link: googleapis/googleapis@513440f Source-Link: https://github.com/googleapis/googleapis-gen/commit/7b1e2c31233f79a704ec21ca410bf661d6bc68d0
1 parent 4f8bac5 commit 160a7ad

File tree

16 files changed

+124
-28
lines changed

16 files changed

+124
-28
lines changed

google/cloud/automl_v1/services/auto_ml/transports/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def __init__(
104104
scopes_kwargs = self._get_scopes_kwargs(self._host, scopes)
105105

106106
# Save the scopes.
107-
self._scopes = scopes or self.AUTH_SCOPES
107+
self._scopes = scopes
108108

109109
# If no credentials are provided, then determine the appropriate
110110
# defaults.

google/cloud/automl_v1/services/auto_ml/transports/grpc.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ def __init__(
7979
client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None,
8080
quota_project_id: Optional[str] = None,
8181
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
82+
always_use_jwt_access: Optional[bool] = False,
8283
) -> None:
8384
"""Instantiate the transport.
8485
@@ -119,6 +120,8 @@ def __init__(
119120
API requests. If ``None``, then default info will be used.
120121
Generally, you only need to set this if you're developing
121122
your own client library.
123+
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
124+
be used for service account credentials.
122125
123126
Raises:
124127
google.auth.exceptions.MutualTLSChannelError: If mutual TLS transport
@@ -172,7 +175,7 @@ def __init__(
172175
scopes=scopes,
173176
quota_project_id=quota_project_id,
174177
client_info 8000 =client_info,
175-
always_use_jwt_access=True,
178+
always_use_jwt_access=always_use_jwt_access,
176179
)
177180

178181
if not self._grpc_channel:

google/cloud/automl_v1/services/auto_ml/transports/grpc_asyncio.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ def __init__(
125125
client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None,
126126
quota_project_id=None,
127127
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
128+
always_use_jwt_access: Optional[bool] = False,
128129
) -> None:
129130
"""Instantiate the transport.
130131
@@ -166,6 +167,8 @@ def __init__(
166167
API requests. If ``None``, then default info will be used.
167168
Generally, you only need to set this if you're developing
168169
your own client library.
170+
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
171+
be used for service account credentials.
169172
170173
Raises:
171174
google.auth.exceptions.MutualTlsChannelError: If mutual TLS transport
@@ -218,7 +221,7 @@ def __init__(
218221
scopes=scopes,
219222
quota_project_id=quota_project_id,
220223
client_info=client_info,
221-
always_use_jwt_access=True,
224+
always_use_jwt_access=always_use_jwt_access,
222225
)
223226

224227
if not self._grpc_channel:

google/cloud/automl_v1/services/prediction_service/transports/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def __init__(
9898
scopes_kwargs = self._get_scopes_kwargs(self._host, scopes)
9999

100100
# Save the scopes.
101-
self._scopes = scopes or self.AUTH_SCOPES
101+
self._scopes = scopes
102102

103103
# If no credentials are provided, then determine the appropriate
104104
# defaults.

google/cloud/automl_v1/services/prediction_service/transports/grpc.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ def __init__(
6262
client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None,
6363
quota_project_id: Optional[str] = None,
6464
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
65+
always_use_jwt_access: Optional[bool] = False,
6566
) -> None:
6667
"""Instantiate the transport.
6768
@@ -102,6 +103,8 @@ def __init__(
102103
API requests. If ``None``, then default info will be used.
103104
Generally, you only need to set this if you're developing
104105
your own client library.
106+
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
107+
be used for service account credentials.
105108
106109
Raises:
107110
google.auth.exceptions.MutualTLSChannelError: If mutual TLS transport
@@ -155,7 +158,7 @@ def __init__(
155158
scopes=scopes,
156159
quota_project_id=quota_project_id,
157160
client_info=client_info,
158-
always_use_jwt_access=True,
161+
always_use_jwt_access=always_use_jwt_access,
159162
)
160163

161164
if not self._grpc_channel:

google/cloud/automl_v1/services/prediction_service/transports/grpc_asyncio.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ def __init__(
108108
client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None,
109109
quota_project_id=None,
110110
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
111+
always_use_jwt_access: Optional[bool] = False,
111112
) -> None:
112113
"""Instantiate the transport.
113114
@@ -149,6 +150,8 @@ def __init__(
149150
API requests. If ``None``, then default info will be used.
150151
Generally, you only need to set this if you're developing
151152
your own client library.
153+
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
154+
be used for service account credentials.
152155
153156
Raises:
154157
google.auth.exceptions.MutualTlsChannelError: If mutual TLS transport
@@ -201,7 +204,7 @@ def __init__(
201204
scopes=scopes,
202205
quota_project_id=quota_project_id,
203206
client_info=client_info,
204-
always_use_jwt_access=True,
207+
always_use_jwt_access=always_use_jwt_access,
205208
)
206209

207210
if not self._grpc_channel:

google/cloud/automl_v1beta1/services/auto_ml/transports/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def __init__(
107107
scopes_kwargs = self._get_scopes_kwargs(self._host, scopes)
108108

109109
# Save the scopes.
110-
self._scopes = scopes or self.AUTH_SCOPES
110+
self._scopes = scopes
111111

112112
# If no credentials are provided, then determine the appropriate
113113
# defaults.

google/cloud/automl_v1beta1/services/auto_ml/transports/grpc.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ def __init__(
8282
client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None,
8383
quota_project_id: Optional[str] = None,
8484
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
85+
always_use_jwt_access: Optional[bool] = False,
8586
) -> None:
8687
"""Instantiate the transport.
8788
@@ -122,6 +123,8 @@ def __init__(
122123
API requests. If ``None``, then default info will be used.
123124
Generally, you only need to set this if you're developing
124125
your own client library.
126+
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
127+
be used for service account credentials.
125128
126129
Raises:
127130
google.auth.exceptions.MutualTLSChannelError: If mutual TLS transport
@@ -175,7 +178,7 @@ def __init__(
175178
scopes=scopes,
176179
quota_project_id=quota_project_id,
177180
client_info=client_info,
178-
always_use_jwt_access=True,
181+
always_use_jwt_access=always_use_jwt_access,
179182
)
180183

181184
if not self._grpc_channel:

google/cloud/automl_v1beta1/services/auto_ml/transports/grpc_asyncio.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ def __init__(
128128
client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None,
129129
quota_project_id=None,
130130
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
131+
always_use_jwt_access: Optional[bool] = False,
131132
) -> None:
132133
"""Instantiate the transport.
133134
@@ -169,6 +170,8 @@ def __init__(
169170
API requests. If ``None``, then default info will be used.
170171
Generally, you only need to set this if you're developing
171172
your own client library.
173+
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
174+
be used for service account credentials.
172175
173176
Raises:
174177
google.auth.exceptions.MutualTlsChannelError: If mutual TLS transport
@@ -221,7 +224,7 @@ def __init__(
221224
scopes=scopes,
222225
quota_project_id=quota_project_id,
223226
client_info=client_info,
224-
always_use_jwt_access=True,
227+
always_use_jwt_access=always_use_jwt_access,
225228
)
226229

227230
if not self._grpc_channel:

google/cloud/automl_v1beta1/services/prediction_service/transports/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def __init__(
9898
scopes_kwargs = self._get_scopes_kwargs(self._host, scopes)
9999

100100
# Save the scopes.
101-
self._scopes = scopes or self.AUTH_SCOPES
101+
self._scopes = scopes
102102

103103
# If no credentials are provided, then determine the appropriate
104104
# defaults.

0 commit comments

Comments
 (0)
0