Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: googleapis/google-auth-library-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.33.1
Choose a base ref
...
head repository: googleapis/google-auth-library-python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.34.0
Choose a head ref
  • 5 commits
  • 15 files changed
  • 7 contributors

Commits on Jul 21, 2021

  1. chore: add Sijun and Silvano as CODEOWNERS (#813)

    This ensures they are automatically tagged in PRs for reviews.
    busunkim96 authored Jul 21, 2021
    Configuration menu
    Copy the full SHA
    63ac08a View commit details
    Browse the repository at this point in the history

Commits on Jul 22, 2021

  1. feat: support refresh callable on google.oauth2.credentials.Credentia…

    …ls (#812)
    
    This is an optional parameter that can be set via the constructor.
    It is used to provide the credentials with new tokens and their
    expiration time on `refresh()` call.
    
    ```
    def refresh_handler(request, scopes):
        # Generate a new token for the requested scopes by calling
        # an external process.
        return (
            "ACCESS_TOKEN",
            _helpers.utcnow() + datetime.timedelta(seconds=3600))
    
    creds = google.oauth2.credentials.Credentials(
        scopes=scopes,
        refresh_handler=refresh_handler)
    creds.refresh(request)
    ```
    
    It is useful in the following cases:
    - Useful in general when tokens are obtained by calling some
      external process on demand.
    - Useful in particular for retrieving downscoped tokens from a
      token broker.
    
    This should have no impact on existing behavior. Refresh tokens
    will still have higher priority over refresh handlers.
    
    A getter and setter is exposed to make it easy to set the callable
    on unpickled credentials as the callable may not be easily serialized.
    
    ```
    unpickled = pickle.loads(pickle.dumps(oauth_creds))
    unpickled.refresh_handler = refresh_handler
    ```
    bojeil-google authored Jul 22, 2021
    Configuration menu
    Copy the full SHA
    ec2fb18 View commit details
    Browse the repository at this point in the history

Commits on Jul 23, 2021

  1. chore: fix kokoro config for samples (#817)

    Source-Link: googleapis/synthtool@dd05f9d
    Post-Processor: gcr.io/repo-automation-bots/owlbot-python:latest@sha256:aea14a583128771ae8aefa364e1652f3c56070168ef31beb203534222d842b8b
    
    Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
    gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Jul 23, 2021
    Configuration menu
    Copy the full SHA
    3a0325f View commit details
    Browse the repository at this point in the history
  2. fix: do not use the GAE APIs on gen2+ runtimes (#807)

    * fix: do not use the GAE APIs on gen2+ runtimes
    
    Currently, this library uses the App Engine API in all environments if
    it can be imported successfully. This assumption made sense when the API
    was only available on gen1, but this is no longer the case.
    See https://github.com/GoogleCloudPlatform/appengine-python-standard
    
    In order to comply with AIP-4115, we must treat GAE gen2+ as a "compute
    engine equivalent environment" even if the GAE APIs are importable.
    In other words, google.auth.default() must never return an
    app_engine.Credental on GAE gen2+.Currently, this library uses the App Engine API in all environments if
    it can be imported successfully. This assumption made sense when the API
    was only available on gen1, but this is no longer the case.
    See https://github.com/GoogleCloudPlatform/appengine-python-standard
    
    In order to comply with AIP-4115, we must treat GAE gen2+ as a "compute
    engine equivalent environment" even if the GAE APIs are importable.
    In other words, google.auth.default() should not return an
    app_engine.Credental on GAE gen2+.
    
    * blacken
    
    Co-authored-by: arithmetic1728 <[email protected]>
    zevdg and arithmetic1728 authored Jul 23, 2021
    Configuration menu
    Copy the full SHA
    7f7d92d View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2021

  1. chore: release 1.34.0 (#816)

    Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
    release-please[bot] authored Jul 27, 2021
    Configuration menu
    Copy the full SHA
    c3f164f View commit details
    Browse the repository at this point in the history
Loading