Document new ouath create form, make consistent with check serviceaccount (#1168)

This commit is contained in:
Ross Scroggs
2020-04-24 07:21:49 -07:00
committed by GitHub
parent a2b3975c12
commit 4cd92a1372
2 changed files with 3 additions and 2 deletions

View File

@@ -845,6 +845,7 @@ gam delete sakey|sakeys <ServiceAccountKeyList>+ [doit]
gam show sakey|sakeys [all|system|user] gam show sakey|sakeys [all|system|user]
gam oauth|oauth2 create|request [<EmailAddress>] gam oauth|oauth2 create|request [<EmailAddress>]
gam oauth|oauth2 create|request [admin <EmailAddress>] [scope|scopes <APIScopeURLList>]
gam oauth|oauth2 delete|revoke gam oauth|oauth2 delete|revoke
gam oauth|oauth2 info|verify [accesstoken <AccessToken>] [idtoken <IDToken>] [showsecret] gam oauth|oauth2 info|verify [accesstoken <AccessToken>] [idtoken <IDToken>] [showsecret]
gam oauth|oauth2 refresh gam oauth|oauth2 refresh

View File

@@ -10076,7 +10076,7 @@ def createOAuth():
'''Explicit command line to create OAuth credentials''' '''Explicit command line to create OAuth credentials'''
login_hint = None login_hint = None
scopes = 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 <email> # legacy "gam oauth create/request <email>
login_hint = sys.argv[3] login_hint = sys.argv[3]
else: else:
@@ -10086,7 +10086,7 @@ def createOAuth():
if myarg == 'admin': if myarg == 'admin':
login_hint = sys.argv[i+1] login_hint = sys.argv[i+1]
i += 2 i += 2
elif myarg == 'scopes': elif myarg in ['scope', 'scopes']:
scopes = sys.argv[i+1].split(',') scopes = sys.argv[i+1].split(',')
i += 2 i += 2
else: else: