returnconfig&&config.auth&&config.auth.token?(token=config.auth.token,authLogger.log("AuthService.addAuthToRequest(), using token from request config",token)):(token=userStore.getToken(),authLogger.log("AuthService.addAuthToRequest(), using token from user store",token)),token?("WATCH"===config.method?(config.url=URI(config.url).addQuery({
returnconfig&&config.auth&&config.auth.token?(token=config.auth.token,authLogger.log("AuthService.addAuthToRequest(), using token from request config",token)):(token=userStore.getToken(),authLogger.log("AuthService.addAuthToRequest(), using token from user store",token)),token?("WATCH"===config.method?(config.protocols=config.protocols||[],_.isArray(config.protocols)||(config.protocols=[config.protocols]),0==config.protocols.length&&config.protocols.unshift("undefined"),config.protocols.unshift("base64url.bearer.authorization.k8s.io."+base64.urlencode(token)),authLogger.log("AuthService.addAuthToRequest(), added token protocol",config.protocols)):(config.headers.Authorization="Bearer "+token,authLogger.log("AuthService.addAuthToRequest(), added token header",config.headers.Authorization)),!0):(authLogger.log("AuthService.addAuthToRequest(), no token available"),!1);
},
startLogin:function(){
if(_loginPromise)returnauthLogger.log("Login already in progress"),_loginPromise;