d258d4da63
Refactor doRequestOAuth
...
The selected scopes list can't be created until completion; otherwise
turning off a scope in one API turns it off in all other APIs.
Elimination of child scopes is still supported in select-default.
Top level API list is sorted.
2016-01-04 12:23:54 -08:00
cb79688a73
in doRequestOAuth, sort list by API title
2016-01-04 10:52:33 -08:00
0209b51c4d
Clean up no setCurrentAPIScopes, api, version not needed
...
No scopes error message changed to take API title
2016-01-04 05:48:07 -08:00
f35c188496
Finish refactoring doRequestOAuth, make selected_scopes a set
2016-01-03 23:24:40 -08:00
c00d820c75
Eliminate extraneous loop
2016-01-03 21:42:32 -08:00
69689e286b
Fix setCurrentAPIScopes to work for both buildGAPIObject and OAuthInfo
2016-01-03 20:39:34 -08:00
5697580bd0
Fix typo
2016-01-03 20:21:33 -08:00
2288e99e56
Dynamic scope cleanup
2016-01-03 20:19:40 -08:00
23cb9afec7
Merge remote-tracking branch 'jay0lee/master'
...
# Conflicts:
# src/gam.py
2016-01-03 16:04:44 -08:00
3a38dceb5f
Dynamic scope repair
...
The last changes broke GData services and gam oath info
2016-01-03 10:00:12 -08:00
b7d5374718
refactor saving of scopes to be a single list, not per API
...
-allows for APIs which have overlapping scopes (Drive, Apps Activity)
-buildGAPIObject() can dynamically decide which scopes to ask for based
on:
-scopes that API claims to use (discovery document)
-scopes that user has prevously selected
-still need to fixup GData API calls to make do same.
2016-01-03 10:11:12 -05:00
0424ced649
Reorder cancel and continue/back in doRequestOAuth, add missing .keys()
2016-01-02 13:35:08 -08:00
9f75968684
More clean up of doRequestOAuth
2016-01-02 12:38:45 -08:00
90fd503838
If GA_DOMAIN not set, derive domain from GAM_ADMIN if defined
...
If neither set, we have to decide what to do.
2016-01-02 11:59:37 -08:00
a7a3f2eef6
Clean up input handling in doRequestOauth
2016-01-02 09:52:10 -08:00
008a65329e
gam oauth info now verifies scopes
2016-01-02 09:10:22 -08:00
2390c4284e
Clearing cache_dir has to come after directory check
2016-01-02 07:44:48 -08:00
75483185d6
Clean up
...
Clean up handling of missing json files
Clean up processing environment variables, signal files
2016-01-02 07:09:15 -08:00
acb21cb926
Clean signature printing
2016-01-01 14:39:10 -08:00
c0ee674060
Full scopes list causes internal error, back (for now) to API specific list
2016-01-01 14:04:01 -08:00
7d69c8e3bd
Dynamic scopes cleanup
...
I deleted the 'email' scope because it caused everything to fail as
it's not (and never was) authorized. What was/is it for?
2016-01-01 12:13:02 -08:00
bcb17cd0a5
in doRequestOauth, initialize API use_scopes from gamscopes.json if available
2016-01-01 07:40:22 -08:00
1ec164a25a
Bring gam oauth delete back, give creation message
2016-01-01 06:50:16 -08:00
571a9dcb3e
Handle no scopes for API
...
This should probably call doRequestOAuth rather than bailing out
2015-12-31 23:37:15 -08:00
a0ac6265e9
If SetGlobalVariables calls doRequestOAuth, don't call again if command is oauth create
2015-12-31 23:18:44 -08:00
ea6f49f7be
Have OAuthInfo print API scope table
2015-12-31 22:54:07 -08:00
0470680a4d
Add some error checking for gamscopes.json
2015-12-31 20:43:33 -08:00
e0c52c8660
First cut, dynamic scopes
...
Environment variable GAMSCOPESFILE points to scopes file.
Scopes file gamscopes.json
2015-12-31 20:20:38 -08:00
3182ce031c
Leave email scope in tryOAuth
2015-12-31 18:00:29 -08:00
f6dd0ccd12
Cleanup doRequestOAuth
...
admin_email isn't used; If it's going to be used I'd say:
`
if GC-Values{GC_ADMIN):
admin_email = GC_Values[GC_ADMIN]
else:
admin_email = raw_input(u'Please enter your admin email address: ')
`
'oauth2' isn't in API_VER_MAPPING so the remove fails. If it might go
back in but you don't want it here, say:
`
if u'oauth2' in apis:
apis.remove(u'oauth2')
`
2015-12-31 17:30:39 -08:00
775b0c8c60
Merge remote-tracking branch 'jay0lee/master'
2015-12-31 16:43:57 -08:00
1c4424dd0b
Get doRequestOAuth to actually print out list of scopes
2015-12-31 16:47:53 -05:00
2bf8f9164e
Fix typo, drop unneeded API from table
2015-12-31 08:59:38 -08:00
56732ea3e8
Commit Jay's changes
2015-12-31 08:18:28 -08:00
7a4b32aadb
Merge remote-tracking branch 'jay0lee/master'
...
# Conflicts:
# src/gam.py
2015-12-31 08:10:35 -08:00
16add1bf24
UBER_SCOPE for appsactivity-v1 API
2015-12-31 09:34:03 -05:00
433cdfe87d
define UBER_SCOPES to cut down on unnecessary scope overlap
2015-12-31 08:57:16 -05:00
a3d0a0250a
Remove usage of oauth2 API for now as it's nearly useless
2015-12-31 08:52:05 -05:00
b037333d2b
Clean up OAuthInfo
2015-12-31 01:01:05 -08:00
bf6c2ef266
buildGAPIObject reworked
...
This gets everything working but does not address the issue of matching
the admins actual scope list.
You'd better define GA_DOMAIN as it used to come out of oauth2.txt if
it wasn't defined.
I had to add Audit API and Site Verification API to the service account
list of APIs and downloaded a new oauth2service.json.
2015-12-30 23:39:04 -08:00
abde922b49
Only build object if necessary
2015-12-30 15:38:39 -08:00
eca89ca5e9
Fix typo
2015-12-30 15:17:43 -08:00
12166e2245
more work on dynamic scope selections
2015-12-30 17:10:06 -05:00
20bba75e41
default scope selections
...
basic logic is:
-if 1 scope for API, use it
-skip over scopes ending in .readonly, .action or .verify_only UNLESS
all scopes are readonly, use all scopes (this is case with reports api)
-all other scopes are used by default.
2015-12-30 16:12:49 -05:00
881cc4d255
redo of Ross' latest patch against my updates
2015-12-30 15:36:24 -05:00
3d61973071
discovery files for 2 other gdata apis to standardize scope discovery
2015-12-30 15:30:58 -05:00
900fc9c4e3
sanitize some defaults
2015-12-30 14:22:33 -05:00
7aaaaf9125
Fix type, delete obsolete function
2015-12-30 10:59:04 -08:00
df0bcda952
Merge pull request #157 from taers232c/master
...
no_browser.txt still needed by output_csv
2015-12-30 13:28:49 -05:00
d871378336
dynamically get API scopes for "gam oauth request"
2015-12-30 13:25:06 -05:00