1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-04 10:19:30 +02:00

add openid to options

This commit is contained in:
codeskyblue 2016-01-13 14:20:42 +08:00 committed by Vishal Banthia
parent e8a2a6637f
commit 4c2da1056d
2 changed files with 37 additions and 11 deletions

View file

@ -573,6 +573,42 @@ program
})
})
program
.command('auth-openid')
.description('start openid auth client')
.option('-p, --port <port>'
, 'port (or $PORT)'
, Number
, process.env.PORT || 7120)
.option('-s, --secret <secret>'
, 'secret (or $SECRET)'
, String
, process.env.SECRET)
.option('-a, --app-url <url>'
, 'URL to app'
, String)
.option('--identifier <identifier>'
, 'identifier'
, String)
.action(function(options) {
if (!options.identifier) {
this.missingArgument('--identifier')
}
if (!options.secret) {
this.missingArgument('--secret')
}
if (!options.appUrl) {
this.missingArgument('--app-url')
}
require('./units/auth/openid')({
port: options.port,
secret: options.secret,
appUrl: options.appUrl,
identifier: options.identifier
})
})
program
.command('notify-hipchat')
.description('start HipChat notifier')
@ -1014,7 +1050,7 @@ program
, 'device pull endpoint'
, String
, 'tcp://127.0.0.1:7116')
.option('--auth-type <mock|ldap|oauth2|saml2>'
.option('--auth-type <mock|ldap|oauth2|saml2|openid>'
, 'auth type'
, String
, 'mock')