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

Make it possible to switch auth provider even when using stf local, although it's a bit involved.

This commit is contained in:
Simo Kinnunen 2015-06-30 18:40:31 +09:00
parent 94dc1689b8
commit 15a6a1ab24

View file

@ -823,6 +823,10 @@ program
, 'device pull endpoint'
, String
, 'tcp://127.0.0.1:7116')
.option('--auth-type <mock|ldap|oauth2>'
, 'auth type'
, String
, 'mock')
.option('--auth-port <port>'
, 'auth port'
, Number
@ -831,6 +835,10 @@ program
, 'auth secret'
, String
, 'kute kittykat')
.option('--auth-options <json>'
, 'array of options to pass to the auth implementation'
, String
, '[]')
.option('--poorxy-port <port>'
, 'poorxy port'
, Number
@ -941,9 +949,9 @@ program
, '--adb-port', options.adbPort
].concat(cliutil.allUnknownArgs(args)))
// auth-mock
// auth
, procutil.fork(__filename, [
'auth-mock'
util.format('auth-%s', options.authType)
, '--port', options.authPort
, '--secret', options.authSecret
, '--app-url', util.format(
@ -951,7 +959,7 @@ program
, options.publicIp
, options.poorxyPort
)
])
].concat(JSON.parse(options.authOptions)))
// app
, procutil.fork(__filename, [
@ -959,9 +967,10 @@ program
, '--port', options.appPort
, '--secret', options.authSecret
, '--auth-url', util.format(
'http://%s:%d/auth/mock/'
'http://%s:%d/auth/%s/'
, options.publicIp
, options.poorxyPort
, options.authType
)
, '--websocket-url', util.format(
'http://%s:%d/'