mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-19 00:33:30 +02:00
add openid to options
This commit is contained in:
committed by
Vishal Banthia
parent
e8a2a6637f
commit
4c2da1056d
38
lib/cli.js
38
lib/cli.js
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user