Codebase list google-auth-oauthlib / d31db4b4-5db3-4c2a-b5dd-7d93259b74dd/main
New upstream release. Debian Janitor 2 years ago
10 changed file(s) with 129 addition(s) and 108 deletion(s). Raw diff Collapse all Expand all
0 Apache License
0
1 Apache License
12 Version 2.0, January 2004
2 https://www.apache.org/licenses/
3 http://www.apache.org/licenses/
34
45 TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
56
191192 you may not use this file except in compliance with the License.
192193 You may obtain a copy of the License at
193194
194 https://www.apache.org/licenses/LICENSE-2.0
195 http://www.apache.org/licenses/LICENSE-2.0
195196
196197 Unless required by applicable law or agreed to in writing, software
197198 distributed under the License is distributed on an "AS IS" BASIS,
1515
1616 # Generated by synthtool. DO NOT EDIT!
1717 include README.rst LICENSE
18 recursive-include google *.json *.proto
18 recursive-include google *.json *.proto py.typed
1919 recursive-include tests *
2020 global-exclude *.py[co]
2121 global-exclude __pycache__
2222
2323 # Exclude scripts for samples readmegen
24 prune scripts/readme-gen
24 prune scripts/readme-gen
00 Metadata-Version: 2.1
11 Name: google-auth-oauthlib
2 Version: 0.4.2
2 Version: 0.4.5
33 Summary: Google Authentication Library
44 Home-page: https://github.com/GoogleCloudPlatform/google-auth-library-python-oauthlib
55 Author: Google Cloud Platform
66 Author-email: jonwayne+google-auth@google.com
77 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
488 Keywords: google auth oauth client oauthlib
499 Platform: UNKNOWN
5010 Classifier: Programming Language :: Python :: 3
6222 Classifier: Topic :: Internet :: WWW/HTTP
6323 Requires-Python: >=3.6
6424 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
11
22 * Set upstream metadata fields: Repository, Repository-Browse.
3 * New upstream release.
34
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
56
67 google-auth-oauthlib (0.4.2-1) unstable; urgency=medium
78
8787 from the `Google API Console`_.
8888
8989 .. _client secrets file:
90 https://developers.google.com/identity/protocols/OAuth2WebServer
90 https://developers.google.com/identity/protocols/oauth2/web-server
9191 #creatingcred
9292 .. _Google API Console:
9393 https://console.developers.google.com/apis/credentials
118118 autogenerate_code_verifier (bool): If true, auto-generate a
119119 code_verifier.
120120 .. _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
123123 """
124124 self.client_type = client_type
125125 """str: The client type, either ``'web'`` or ``'installed'``"""
152152 format.
153153
154154 .. _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
157157 """
158158 if "web" in client_config:
159159 client_type = "web"
356356 response, such as using an embedded web view.
357357
358358 .. _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
361360 """
362361
363362 _OOB_REDIRECT_URI = "urn:ietf:wg:oauth:2.0:oob"
421420 authorization_prompt_message=_DEFAULT_AUTH_PROMPT_MESSAGE,
422421 success_message=_DEFAULT_WEB_SUCCESS_MESSAGE,
423422 open_browser=True,
423 redirect_uri_trailing_slash=True,
424424 **kwargs
425425 ):
426426 """Run the flow using the server strategy.
443443 the authorization flow is complete.
444444 open_browser (bool): Whether or not to open the authorization URL
445445 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.
446448 kwargs: Additional keyword arguments passed through to
447449 :meth:`authorization_url`.
448450
457459 host, port, wsgi_app, handler_class=_WSGIRequestHandler
458460 )
459461
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)
461466 auth_url, _ = self.authorization_url(**kwargs)
462467
463468 if open_browser:
516521 Returns:
517522 Iterable[bytes]: The response body.
518523 """
519 start_response("200 OK", [("Content-type", "text/plain")])
524 start_response("200 OK", [("Content-type", "text/plain; charset=utf-8")])
520525 self.last_request_uri = wsgiref.util.request_uri(environ)
521526 return [self._success_message.encode("utf-8")]
5050 oauthlib session and the validated client configuration.
5151
5252 .. _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
5555 """
5656
5757 if "web" in client_config:
8888 oauthlib session and the validated client configuration.
8989
9090 .. _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
9393 """
9494 with open(client_secrets_file, "r") as json_file:
9595 client_config = json.load(json_file)
00 Metadata-Version: 2.1
11 Name: google-auth-oauthlib
2 Version: 0.4.2
2 Version: 0.4.5
33 Summary: Google Authentication Library
44 Home-page: https://github.com/GoogleCloudPlatform/google-auth-library-python-oauthlib
55 Author: Google Cloud Platform
66 Author-email: jonwayne+google-auth@google.com
77 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
488 Keywords: google auth oauth client oauthlib
499 Platform: UNKNOWN
5010 Classifier: Programming Language :: Python :: 3
6222 Classifier: Topic :: Internet :: WWW/HTTP
6323 Requires-Python: >=3.6
6424 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
0 google-auth>=1.0.0
11 requests-oauthlib>=0.7.0
22
33 [tool]
4 click
4 click>=6.0.0
1717 from setuptools import setup
1818
1919
20 TOOL_DEPENDENCIES = "click"
20 TOOL_DEPENDENCIES = "click>=6.0.0"
2121
22 DEPENDENCIES = ("google-auth", "requests-oauthlib>=0.7.0")
22 DEPENDENCIES = ("google-auth>=1.0.0", "requests-oauthlib>=0.7.0")
2323
2424
2525 with io.open("README.rst", "r") as fh:
2626 long_description = fh.read()
2727
2828
29 version = "0.4.2"
29 version = "0.4.5"
3030
3131 setup(
3232 name="google-auth-oauthlib",
320320 assert credentials._refresh_token == mock.sentinel.refresh_token
321321 assert credentials.id_token == mock.sentinel.id_token
322322 assert webbrowser_mock.open.called
323 assert instance.redirect_uri == f"http://localhost:{port}/"
323324
324325 expected_auth_response = auth_redirect_url.replace("http", "https")
325326 mock_fetch_token.assert_called_with(
340341 instance.code_verifier = "amanaplanacanalpanama"
341342
342343 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 )
344351
345352 while not future.done():
346353 try:
354361 assert credentials._refresh_token == mock.sentinel.refresh_token
355362 assert credentials.id_token == mock.sentinel.id_token
356363 assert webbrowser_mock.open.called
364 assert instance.redirect_uri == f"http://localhost:{port}"
357365
358366 expected_auth_response = auth_redirect_url.replace("http", "https")
359367 mock_fetch_token.assert_called_with(