From 4cd92a13724fa4e9cf3d9d6416c6ea4213b969be Mon Sep 17 00:00:00 2001 From: Ross Scroggs Date: Fri, 24 Apr 2020 07:21:49 -0700 Subject: [PATCH] Document new ouath create form, make consistent with check serviceaccount (#1168) --- src/GamCommands.txt | 1 + src/gam/__init__.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/GamCommands.txt b/src/GamCommands.txt index b365c3a8..cb85311d 100644 --- a/src/GamCommands.txt +++ b/src/GamCommands.txt @@ -845,6 +845,7 @@ gam delete sakey|sakeys + [doit] gam show sakey|sakeys [all|system|user] gam oauth|oauth2 create|request [] +gam oauth|oauth2 create|request [admin ] [scope|scopes ] gam oauth|oauth2 delete|revoke gam oauth|oauth2 info|verify [accesstoken ] [idtoken ] [showsecret] gam oauth|oauth2 refresh diff --git a/src/gam/__init__.py b/src/gam/__init__.py index cdf70afb..87020f75 100755 --- a/src/gam/__init__.py +++ b/src/gam/__init__.py @@ -10076,7 +10076,7 @@ def createOAuth(): '''Explicit command line to create OAuth credentials''' login_hint = None scopes = None - if len(sys.argv) >= 4 and sys.argv[3].lower() not in ['admin', 'scopes']: + if len(sys.argv) >= 4 and sys.argv[3].lower() not in ['admin', 'scope', 'scopes']: # legacy "gam oauth create/request login_hint = sys.argv[3] else: @@ -10086,7 +10086,7 @@ def createOAuth(): if myarg == 'admin': login_hint = sys.argv[i+1] i += 2 - elif myarg == 'scopes': + elif myarg in ['scope', 'scopes']: scopes = sys.argv[i+1].split(',') i += 2 else: