Bug 814247 - Add auth cache jars for separate apps. r=mayhemer,bsmedberg

This commit is contained in:
Josh Matthews
2012-12-05 02:33:20 -05:00
parent 672874b5de
commit 2d88328b90
9 changed files with 338 additions and 26 deletions

View File

@@ -2771,12 +2771,16 @@ _getauthenticationinfo(NPP instance, const char *protocol, const char *host,
bool authPrivate = false;
GetPrivacyFromNPP(instance, &authPrivate);
nsIDocument *doc = GetDocumentFromNPP(instance);
NS_ENSURE_TRUE(doc, NPERR_GENERIC_ERROR);
nsIPrincipal *principal = doc->NodePrincipal();
nsAutoString unused, uname16, pwd16;
if (NS_FAILED(authManager->GetAuthIdentity(proto, nsDependentCString(host),
port, nsDependentCString(scheme),
nsDependentCString(realm),
EmptyCString(), unused, uname16,
pwd16, authPrivate))) {
pwd16, authPrivate, principal))) {
return NPERR_GENERIC_ERROR;
}