New upstream release.
Debian Janitor
2 years ago
0 | Apache License | |
0 | ||
1 | Apache License | |
1 | 2 | Version 2.0, January 2004 |
2 | https://www.apache.org/licenses/ | |
3 | http://www.apache.org/licenses/ | |
3 | 4 | |
4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION |
5 | 6 | |
191 | 192 | you may not use this file except in compliance with the License. |
192 | 193 | You may obtain a copy of the License at |
193 | 194 | |
194 | https://www.apache.org/licenses/LICENSE-2.0 | |
195 | http://www.apache.org/licenses/LICENSE-2.0 | |
195 | 196 | |
196 | 197 | Unless required by applicable law or agreed to in writing, software |
197 | 198 | distributed under the License is distributed on an "AS IS" BASIS, |
15 | 15 | |
16 | 16 | # Generated by synthtool. DO NOT EDIT! |
17 | 17 | include README.rst LICENSE |
18 | recursive-include google *.json *.proto | |
18 | recursive-include google *.json *.proto py.typed | |
19 | 19 | recursive-include tests * |
20 | 20 | global-exclude *.py[co] |
21 | 21 | global-exclude __pycache__ |
22 | 22 | |
23 | 23 | # Exclude scripts for samples readmegen |
24 | prune scripts/readme-gen⏎ | |
24 | prune scripts/readme-gen |
0 | 0 | Metadata-Version: 2.1 |
1 | 1 | Name: google-auth-oauthlib |
2 | Version: 0.4.2 | |
2 | Version: 0.4.5 | |
3 | 3 | Summary: Google Authentication Library |
4 | 4 | Home-page: https://github.com/GoogleCloudPlatform/google-auth-library-python-oauthlib |
5 | 5 | Author: Google Cloud Platform |
6 | 6 | Author-email: jonwayne+google-auth@google.com |
7 | 7 | License: Apache 2.0 |
8 | Description: oauthlib integration for Google Auth | |
9 | ==================================== | |
10 | ||
11 | |pypi| | |
12 | ||
13 | This library provides `oauthlib`_ integration with `google-auth`_. | |
14 | ||
15 | .. |build| image:: https://travis-ci.org/googleapis/google-auth-library-python-oauthlib.svg?branch=master | |
16 | :target: https://travis-ci.org/googleapis/google-auth-library-python-oauthlib | |
17 | .. |docs| image:: https://readthedocs.org/projects/google-auth-oauthlib/badge/?version=latest | |
18 | :target: https://google-auth-oauthlib.readthedocs.io/en/latest/ | |
19 | .. |pypi| image:: https://img.shields.io/pypi/v/google-auth-oauthlib.svg | |
20 | :target: https://pypi.python.org/pypi/google-auth-oauthlib | |
21 | ||
22 | .. _oauthlib: https://github.com/idan/oauthlib | |
23 | .. _google-auth: https://github.com/googleapis/google-auth-library-python | |
24 | ||
25 | Installing | |
26 | ---------- | |
27 | ||
28 | You can install using `pip`_:: | |
29 | ||
30 | $ pip install google-auth-oauthlib | |
31 | ||
32 | .. _pip: https://pip.pypa.io/en/stable/ | |
33 | ||
34 | Documentation | |
35 | ------------- | |
36 | ||
37 | The latest documentation is available at `google-auth-oauthlib.readthedocs.io`_. | |
38 | ||
39 | .. _google-auth-oauthlib.readthedocs.io: http://google-auth-oauthlib.readthedocs.io/ | |
40 | ||
41 | License | |
42 | ------- | |
43 | ||
44 | Apache 2.0 - See `the LICENSE`_ for more information. | |
45 | ||
46 | .. _the LICENSE: https://github.com/googleapis/google-auth-library-python-oauthlib/blob/master/LICENSE | |
47 | ||
48 | 8 | Keywords: google auth oauth client oauthlib |
49 | 9 | Platform: UNKNOWN |
50 | 10 | Classifier: Programming Language :: Python :: 3 |
62 | 22 | Classifier: Topic :: Internet :: WWW/HTTP |
63 | 23 | Requires-Python: >=3.6 |
64 | 24 | Provides-Extra: tool |
25 | License-File: LICENSE | |
26 | ||
27 | oauthlib integration for Google Auth | |
28 | ==================================== | |
29 | ||
30 | |pypi| | |
31 | ||
32 | This library provides `oauthlib`_ integration with `google-auth`_. | |
33 | ||
34 | .. |build| image:: https://travis-ci.org/googleapis/google-auth-library-python-oauthlib.svg?branch=master | |
35 | :target: https://travis-ci.org/googleapis/google-auth-library-python-oauthlib | |
36 | .. |docs| image:: https://readthedocs.org/projects/google-auth-oauthlib/badge/?version=latest | |
37 | :target: https://google-auth-oauthlib.readthedocs.io/en/latest/ | |
38 | .. |pypi| image:: https://img.shields.io/pypi/v/google-auth-oauthlib.svg | |
39 | :target: https://pypi.python.org/pypi/google-auth-oauthlib | |
40 | ||
41 | .. _oauthlib: https://github.com/idan/oauthlib | |
42 | .. _google-auth: https://github.com/googleapis/google-auth-library-python | |
43 | ||
44 | Installing | |
45 | ---------- | |
46 | ||
47 | You can install using `pip`_:: | |
48 | ||
49 | $ pip install google-auth-oauthlib | |
50 | ||
51 | .. _pip: https://pip.pypa.io/en/stable/ | |
52 | ||
53 | Documentation | |
54 | ------------- | |
55 | ||
56 | The latest documentation is available at `google-auth-oauthlib.readthedocs.io`_. | |
57 | ||
58 | .. _google-auth-oauthlib.readthedocs.io: http://google-auth-oauthlib.readthedocs.io/ | |
59 | ||
60 | License | |
61 | ------- | |
62 | ||
63 | Apache 2.0 - See `the LICENSE`_ for more information. | |
64 | ||
65 | .. _the LICENSE: https://github.com/googleapis/google-auth-library-python-oauthlib/blob/master/LICENSE | |
66 | ||
67 |
0 | google-auth-oauthlib (0.4.2-2) UNRELEASED; urgency=medium | |
0 | google-auth-oauthlib (0.4.5-1) UNRELEASED; urgency=medium | |
1 | 1 | |
2 | 2 | * Set upstream metadata fields: Repository, Repository-Browse. |
3 | * New upstream release. | |
3 | 4 | |
4 | -- Debian Janitor <janitor@jelmer.uk> Wed, 03 Feb 2021 00:01:33 -0000 | |
5 | -- Debian Janitor <janitor@jelmer.uk> Sun, 22 Aug 2021 10:02:20 -0000 | |
5 | 6 | |
6 | 7 | google-auth-oauthlib (0.4.2-1) unstable; urgency=medium |
7 | 8 |
87 | 87 | from the `Google API Console`_. |
88 | 88 | |
89 | 89 | .. _client secrets file: |
90 | https://developers.google.com/identity/protocols/OAuth2WebServer | |
90 | https://developers.google.com/identity/protocols/oauth2/web-server | |
91 | 91 | #creatingcred |
92 | 92 | .. _Google API Console: |
93 | 93 | https://console.developers.google.com/apis/credentials |
118 | 118 | autogenerate_code_verifier (bool): If true, auto-generate a |
119 | 119 | code_verifier. |
120 | 120 | .. _client secrets: |
121 | https://developers.google.com/api-client-library/python/guide | |
122 | /aaa_client_secrets | |
121 | https://github.com/googleapis/google-api-python-client/blob | |
122 | /master/docs/client-secrets.md | |
123 | 123 | """ |
124 | 124 | self.client_type = client_type |
125 | 125 | """str: The client type, either ``'web'`` or ``'installed'``""" |
152 | 152 | format. |
153 | 153 | |
154 | 154 | .. _client secrets: |
155 | https://developers.google.com/api-client-library/python/guide | |
156 | /aaa_client_secrets | |
155 | https://github.com/googleapis/google-api-python-client/blob/ | |
156 | master/docs/client-secrets.md | |
157 | 157 | """ |
158 | 158 | if "web" in client_config: |
159 | 159 | client_type = "web" |
356 | 356 | response, such as using an embedded web view. |
357 | 357 | |
358 | 358 | .. _Installed Application Authorization Flow: |
359 | https://developers.google.com/api-client-library/python/auth | |
360 | /installed-app | |
359 | https://github.com/googleapis/google-api-python-client/blob/master/docs/oauth-installed.md | |
361 | 360 | """ |
362 | 361 | |
363 | 362 | _OOB_REDIRECT_URI = "urn:ietf:wg:oauth:2.0:oob" |
421 | 420 | authorization_prompt_message=_DEFAULT_AUTH_PROMPT_MESSAGE, |
422 | 421 | success_message=_DEFAULT_WEB_SUCCESS_MESSAGE, |
423 | 422 | open_browser=True, |
423 | redirect_uri_trailing_slash=True, | |
424 | 424 | **kwargs |
425 | 425 | ): |
426 | 426 | """Run the flow using the server strategy. |
443 | 443 | the authorization flow is complete. |
444 | 444 | open_browser (bool): Whether or not to open the authorization URL |
445 | 445 | in the user's browser. |
446 | redirect_uri_trailing_slash (bool): whether or not to add trailing | |
447 | slash when constructing the redirect_uri. Default value is True. | |
446 | 448 | kwargs: Additional keyword arguments passed through to |
447 | 449 | :meth:`authorization_url`. |
448 | 450 | |
457 | 459 | host, port, wsgi_app, handler_class=_WSGIRequestHandler |
458 | 460 | ) |
459 | 461 | |
460 | self.redirect_uri = "http://{}:{}/".format(host, local_server.server_port) | |
462 | redirect_uri_format = ( | |
463 | "http://{}:{}/" if redirect_uri_trailing_slash else "http://{}:{}" | |
464 | ) | |
465 | self.redirect_uri = redirect_uri_format.format(host, local_server.server_port) | |
461 | 466 | auth_url, _ = self.authorization_url(**kwargs) |
462 | 467 | |
463 | 468 | if open_browser: |
516 | 521 | Returns: |
517 | 522 | Iterable[bytes]: The response body. |
518 | 523 | """ |
519 | start_response("200 OK", [("Content-type", "text/plain")]) | |
524 | start_response("200 OK", [("Content-type", "text/plain; charset=utf-8")]) | |
520 | 525 | self.last_request_uri = wsgiref.util.request_uri(environ) |
521 | 526 | return [self._success_message.encode("utf-8")] |
50 | 50 | oauthlib session and the validated client configuration. |
51 | 51 | |
52 | 52 | .. _client secrets: |
53 | https://developers.google.com/api-client-library/python/guide | |
54 | /aaa_client_secrets | |
53 | https://github.com/googleapis/google-api-python-client/blob/master/ | |
54 | docs/client-secrets.md | |
55 | 55 | """ |
56 | 56 | |
57 | 57 | if "web" in client_config: |
88 | 88 | oauthlib session and the validated client configuration. |
89 | 89 | |
90 | 90 | .. _client secrets: |
91 | https://developers.google.com/api-client-library/python/guide | |
92 | /aaa_client_secrets | |
91 | https://github.com/googleapis/google-api-python-client/blob/master/ | |
92 | docs/client-secrets.md | |
93 | 93 | """ |
94 | 94 | with open(client_secrets_file, "r") as json_file: |
95 | 95 | client_config = json.load(json_file) |
0 | 0 | Metadata-Version: 2.1 |
1 | 1 | Name: google-auth-oauthlib |
2 | Version: 0.4.2 | |
2 | Version: 0.4.5 | |
3 | 3 | Summary: Google Authentication Library |
4 | 4 | Home-page: https://github.com/GoogleCloudPlatform/google-auth-library-python-oauthlib |
5 | 5 | Author: Google Cloud Platform |
6 | 6 | Author-email: jonwayne+google-auth@google.com |
7 | 7 | License: Apache 2.0 |
8 | Description: oauthlib integration for Google Auth | |
9 | ==================================== | |
10 | ||
11 | |pypi| | |
12 | ||
13 | This library provides `oauthlib`_ integration with `google-auth`_. | |
14 | ||
15 | .. |build| image:: https://travis-ci.org/googleapis/google-auth-library-python-oauthlib.svg?branch=master | |
16 | :target: https://travis-ci.org/googleapis/google-auth-library-python-oauthlib | |
17 | .. |docs| image:: https://readthedocs.org/projects/google-auth-oauthlib/badge/?version=latest | |
18 | :target: https://google-auth-oauthlib.readthedocs.io/en/latest/ | |
19 | .. |pypi| image:: https://img.shields.io/pypi/v/google-auth-oauthlib.svg | |
20 | :target: https://pypi.python.org/pypi/google-auth-oauthlib | |
21 | ||
22 | .. _oauthlib: https://github.com/idan/oauthlib | |
23 | .. _google-auth: https://github.com/googleapis/google-auth-library-python | |
24 | ||
25 | Installing | |
26 | ---------- | |
27 | ||
28 | You can install using `pip`_:: | |
29 | ||
30 | $ pip install google-auth-oauthlib | |
31 | ||
32 | .. _pip: https://pip.pypa.io/en/stable/ | |
33 | ||
34 | Documentation | |
35 | ------------- | |
36 | ||
37 | The latest documentation is available at `google-auth-oauthlib.readthedocs.io`_. | |
38 | ||
39 | .. _google-auth-oauthlib.readthedocs.io: http://google-auth-oauthlib.readthedocs.io/ | |
40 | ||
41 | License | |
42 | ------- | |
43 | ||
44 | Apache 2.0 - See `the LICENSE`_ for more information. | |
45 | ||
46 | .. _the LICENSE: https://github.com/googleapis/google-auth-library-python-oauthlib/blob/master/LICENSE | |
47 | ||
48 | 8 | Keywords: google auth oauth client oauthlib |
49 | 9 | Platform: UNKNOWN |
50 | 10 | Classifier: Programming Language :: Python :: 3 |
62 | 22 | Classifier: Topic :: Internet :: WWW/HTTP |
63 | 23 | Requires-Python: >=3.6 |
64 | 24 | Provides-Extra: tool |
25 | License-File: LICENSE | |
26 | ||
27 | oauthlib integration for Google Auth | |
28 | ==================================== | |
29 | ||
30 | |pypi| | |
31 | ||
32 | This library provides `oauthlib`_ integration with `google-auth`_. | |
33 | ||
34 | .. |build| image:: https://travis-ci.org/googleapis/google-auth-library-python-oauthlib.svg?branch=master | |
35 | :target: https://travis-ci.org/googleapis/google-auth-library-python-oauthlib | |
36 | .. |docs| image:: https://readthedocs.org/projects/google-auth-oauthlib/badge/?version=latest | |
37 | :target: https://google-auth-oauthlib.readthedocs.io/en/latest/ | |
38 | .. |pypi| image:: https://img.shields.io/pypi/v/google-auth-oauthlib.svg | |
39 | :target: https://pypi.python.org/pypi/google-auth-oauthlib | |
40 | ||
41 | .. _oauthlib: https://github.com/idan/oauthlib | |
42 | .. _google-auth: https://github.com/googleapis/google-auth-library-python | |
43 | ||
44 | Installing | |
45 | ---------- | |
46 | ||
47 | You can install using `pip`_:: | |
48 | ||
49 | $ pip install google-auth-oauthlib | |
50 | ||
51 | .. _pip: https://pip.pypa.io/en/stable/ | |
52 | ||
53 | Documentation | |
54 | ------------- | |
55 | ||
56 | The latest documentation is available at `google-auth-oauthlib.readthedocs.io`_. | |
57 | ||
58 | .. _google-auth-oauthlib.readthedocs.io: http://google-auth-oauthlib.readthedocs.io/ | |
59 | ||
60 | License | |
61 | ------- | |
62 | ||
63 | Apache 2.0 - See `the LICENSE`_ for more information. | |
64 | ||
65 | .. _the LICENSE: https://github.com/googleapis/google-auth-library-python-oauthlib/blob/master/LICENSE | |
66 | ||
67 |
17 | 17 | from setuptools import setup |
18 | 18 | |
19 | 19 | |
20 | TOOL_DEPENDENCIES = "click" | |
20 | TOOL_DEPENDENCIES = "click>=6.0.0" | |
21 | 21 | |
22 | DEPENDENCIES = ("google-auth", "requests-oauthlib>=0.7.0") | |
22 | DEPENDENCIES = ("google-auth>=1.0.0", "requests-oauthlib>=0.7.0") | |
23 | 23 | |
24 | 24 | |
25 | 25 | with io.open("README.rst", "r") as fh: |
26 | 26 | long_description = fh.read() |
27 | 27 | |
28 | 28 | |
29 | version = "0.4.2" | |
29 | version = "0.4.5" | |
30 | 30 | |
31 | 31 | setup( |
32 | 32 | name="google-auth-oauthlib", |
320 | 320 | assert credentials._refresh_token == mock.sentinel.refresh_token |
321 | 321 | assert credentials.id_token == mock.sentinel.id_token |
322 | 322 | assert webbrowser_mock.open.called |
323 | assert instance.redirect_uri == f"http://localhost:{port}/" | |
323 | 324 | |
324 | 325 | expected_auth_response = auth_redirect_url.replace("http", "https") |
325 | 326 | mock_fetch_token.assert_called_with( |
340 | 341 | instance.code_verifier = "amanaplanacanalpanama" |
341 | 342 | |
342 | 343 | with concurrent.futures.ThreadPoolExecutor(max_workers=1) as pool: |
343 | future = pool.submit(partial(instance.run_local_server, port=port)) | |
344 | future = pool.submit( | |
345 | partial( | |
346 | instance.run_local_server, | |
347 | port=port, | |
348 | redirect_uri_trailing_slash=False, | |
349 | ) | |
350 | ) | |
344 | 351 | |
345 | 352 | while not future.done(): |
346 | 353 | try: |
354 | 361 | assert credentials._refresh_token == mock.sentinel.refresh_token |
355 | 362 | assert credentials.id_token == mock.sentinel.id_token |
356 | 363 | assert webbrowser_mock.open.called |
364 | assert instance.redirect_uri == f"http://localhost:{port}" | |
357 | 365 | |
358 | 366 | expected_auth_response = auth_redirect_url.replace("http", "https") |
359 | 367 | mock_fetch_token.assert_called_with( |