Set proxy authentication credentials in Chrome Extension

Make sure add "''  and "webRequestBlocking" to permissions section in  manifest file.


chrome.webRequest.onAuthRequired.addListener( function(details, callbackFn) {     console.log("onAuthRequired!", details, callbackFn); callbackFn({ 

     authCredentials: {

            username: base64.decode('eGlldG9uZw'), 

            password: base64.decode('eGlldG9uZzEyMw==')} }); 

 },

 { urls: [""] },

    ['asyncBlocking']

);

你可能感兴趣的:(Set proxy authentication credentials in Chrome Extension)