Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix expiry for to_json() #589

Merged
merged 7 commits into from Sep 17, 2020
Merged

fix: fix expiry for to_json() #589

merged 7 commits into from Sep 17, 2020

Commits on Aug 10, 2020

  1. This patch for <googleapis/issues/501> includes the following fixes:

    - The access token is always set to `None`, so the fix involves using (the access) `token` from the saved JSON credentials file.
    - For refresh needs, `expiry` also needs to be saved via `to_json()`.
        - DUMP: As `expiry` is a `datetime.datetime` object, serialize to `datetime.isoformat()` in the same [`oauth2client` format](https://github.com/googleapis/oauth2client/blob/master/oauth2client/client.py#L55) for consistency.
        - LOAD: Add code to restore `expiry` back to `datetime.datetime` object when imported.
        - LOAD: If `expiry` was unsaved, automatically set it as expired so refresh takes place.
    - Minor `scopes` updates
        - DUMP: Add property for `scopes` so `to_json()` can grab it
        - LOAD: `scopes` may be saved as a string instead of a JSON array (Python list), so ensure it is Sequence[str] when imported.
    wescpy committed Aug 10, 2020
    Configuration menu
    Copy the full SHA
    5a52ca9 View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2020

  1. added/updated test cases

    wescpy committed Aug 16, 2020
    Configuration menu
    Copy the full SHA
    66420f3 View commit details
    Browse the repository at this point in the history

Commits on Aug 17, 2020

  1. linter patch

    wescpy committed Aug 17, 2020
    Configuration menu
    Copy the full SHA
    e35f63f View commit details
    Browse the repository at this point in the history

Commits on Sep 8, 2020

  1. Configuration menu
    Copy the full SHA
    e8f909e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    05aab6c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b8fe4a4 View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2020

  1. Configuration menu
    Copy the full SHA
    98d60fa View commit details
    Browse the repository at this point in the history