diff --git a/lib/cli.js b/lib/cli.js index ac8acf05..eb7393e8 100644 --- a/lib/cli.js +++ b/lib/cli.js @@ -823,6 +823,10 @@ program , 'device pull endpoint' , String , 'tcp://127.0.0.1:7116') + .option('--auth-type ' + , 'auth type' + , String + , 'mock') .option('--auth-port ' , 'auth port' , Number @@ -831,6 +835,10 @@ program , 'auth secret' , String , 'kute kittykat') + .option('--auth-options ' + , 'array of options to pass to the auth implementation' + , String + , '[]') .option('--poorxy-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/'