Skip to content

Commit 82445c3

Browse files
Merge pull request googleapis#404 from nathanielmanistaatgoogle/release-2.0.0
Release 2.0.0.
2 parents 5010a4b + ed6a8ef commit 82445c3

File tree

2 files changed

+60
-1
lines changed

2 files changed

+60
-1
lines changed

CHANGELOG.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,64 @@
11
# CHANGELOG
22

3+
## v2.0.0
4+
5+
* Add django_util (#332)
6+
* Avoid OAuth2Credentials `id_token` going out of sync after a token
7+
refresh (#337)
8+
* Move to a `contrib` sub-package code not considered a core part of
9+
the library (#346, #353, #370, #375, #376, #382)
10+
* Add `token_expiry` to `devshell` credentials (#372)
11+
* Move `Storage` locking into a base class (#379)
12+
* Added dictionary storage (#380)
13+
* Added `to_json` and `from_json` methods to all `Credentials`
14+
classes (#385)
15+
* Fall back to read-only credentials on EACCES errors (#389)
16+
* Coalesced the two `ServiceAccountCredentials`
17+
classes (#395, #396, #397, #398, #400)
18+
19+
### Special Note About `ServiceAccountCredentials`:
20+
-------------------------------------------------
21+
22+
For JSON keys, you can create a credential via
23+
24+
```py
25+
from oauth2client.service_account import ServiceAccountCredentials
26+
credentials = ServiceAccountCredentials.from_json_keyfile_name(
27+
key_file_name, scopes=[...])
28+
```
29+
30+
You can still rely on
31+
32+
```py
33+
from oauth2client.client import GoogleCredentials
34+
credentials = GoogleCredentials.get_application_default()
35+
```
36+
37+
returning these credentials when you set the `GOOGLE_APPLICATION_CREDENTIALS`
38+
environment variable.
39+
40+
For `.p12` keys, construct via
41+
42+
```py
43+
credentials = ServiceAccountCredentials.from_p12_keyfil(
44+
service_account_email, key_file_name, scopes=[...])
45+
```
46+
47+
though we urge you to use JSON keys (rather than `.p12` keys) if you can.
48+
49+
This is equivalent to the previous method
50+
51+
```py
52+
# PRE-oauth2client 2.0.0 EXAMPLE CODE!
53+
from oauth2client.client import SignedJwtAssertionCredentials
54+
55+
with open(key_file_name, 'rb') as key_file:
56+
private_key = key_file.read()
57+
58+
credentials = SignedJwtAssertionCredentials(
59+
service_account_email, private_key, scope=[...])
60+
```
61+
362
## v1.5.2
463

564
* Add access token refresh error class that includes HTTP status (#310)

oauth2client/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
"""Client library for using OAuth2, especially with Google APIs."""
1616

17-
__version__ = '1.5.2'
17+
__version__ = '2.0.0'
1818

1919
GOOGLE_AUTH_URI = 'https://accounts.google.com/o/oauth2/v2/auth'
2020
GOOGLE_DEVICE_URI = 'https://accounts.google.com/o/oauth2/device/code'

0 commit comments

Comments
 (0)