Commit b47af27
committed
fix: parse string and file credentials in uniform way
The Google backend key parsing implementation used JWTConfigFromJSON()
when the key is specified as a JSON string, and this only works with
service account credentials. In contrast, when setting the key to the
path of a file containing the JSON credentials we use the environment
GOOGLE_APPLICATION_CREDENTIALS, which also accepts authorized
user credentials. Change the JSON string key parsing to use
CredentialsFromJSON() to match the functionality of reading the
JSON from a file, allowing the use of authorized user credentials
with string keys.
Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com>1 parent 9377006 commit b47af27
1 file changed
+2
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| |||
777 | 776 | | |
778 | 777 | | |
779 | 778 | | |
780 | | - | |
781 | | - | |
| 779 | + | |
782 | 780 | | |
783 | | - | |
| 781 | + | |
784 | 782 | | |
785 | 783 | | |
786 | 784 | | |
| |||
0 commit comments