From 751fda6b3074bc3853e4d5c05067ccd27a7e23c6 Mon Sep 17 00:00:00 2001 From: Simo Kinnunen Date: Wed, 8 Jul 2015 12:50:09 +0900 Subject: [PATCH] Support custom auth URLs in `stf local` and map oauth2 to the correct URL by default. --- lib/cli.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/cli.js b/lib/cli.js index 363cec5b..424b64da 100644 --- a/lib/cli.js +++ b/lib/cli.js @@ -826,6 +826,9 @@ program , 'auth type' , String , 'mock') + .option('-a, --auth-url ' + , 'URL to auth client' + , String) .option('--auth-port ' , 'auth port' , Number @@ -965,11 +968,11 @@ program 'app' , '--port', options.appPort , '--secret', options.authSecret - , '--auth-url', util.format( + , '--auth-url', options.authUrl || util.format( 'http://%s:%d/auth/%s/' , options.publicIp , options.poorxyPort - , options.authType + , ({oauth2: 'oauth'}[options.authType]) || options.authType ) , '--websocket-url', util.format( 'http://%s:%d/'