re-enable single-signon for browser-generated forms
This commit is contained in:
Родитель
8cff96d246
Коммит
88b7ad8f4f
|
@ -56,7 +56,7 @@ struct nsIWalletService : public nsISupports
|
|||
(char* URLNAME, char* name, char** value)=0;
|
||||
|
||||
NS_IMETHOD SI_PromptUsernameAndPassword
|
||||
(char *prompt, char **username, char **password, char *URLName)=0;
|
||||
(char *prompt, char **username, char **password, char *URLName, PRBool &status)=0;
|
||||
NS_IMETHOD SI_PromptPassword
|
||||
(char *prompt, char **password, char *URLName, PRBool pickFirstUser)=0;
|
||||
NS_IMETHOD SI_Prompt
|
||||
|
|
|
@ -95,8 +95,8 @@ NS_IMETHODIMP nsWalletlibService::SI_RestoreSignonData
|
|||
}
|
||||
|
||||
NS_IMETHODIMP nsWalletlibService::SI_PromptUsernameAndPassword
|
||||
(char *prompt, char **username, char **password, char *URLName) {
|
||||
::SINGSIGN_PromptUsernameAndPassword(prompt, username, password, URLName);
|
||||
(char *prompt, char **username, char **password, char *URLName, PRBool &status) {
|
||||
status = ::SINGSIGN_PromptUsernameAndPassword(prompt, username, password, URLName);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ public:
|
|||
NS_IMETHOD SI_RestoreSignonData
|
||||
(char* URLNAME, char* name, char** value);
|
||||
NS_IMETHOD SI_PromptUsernameAndPassword
|
||||
(char *prompt, char **username, char **password, char *URLName);
|
||||
(char *prompt, char **username, char **password, char *URLName, PRBool &status);
|
||||
NS_IMETHOD SI_PromptPassword
|
||||
(char *prompt, char **password, char *URLName, PRBool pickFirstUser);
|
||||
NS_IMETHOD SI_Prompt
|
||||
|
|
|
@ -2474,11 +2474,11 @@ si_RestoreOldSignonDataFromBrowser
|
|||
}
|
||||
|
||||
/* Browser-generated prompt for user-name and password */
|
||||
PUBLIC int
|
||||
PUBLIC PRBool
|
||||
SINGSIGN_PromptUsernameAndPassword
|
||||
(char *prompt, char **username, char **password, char *URLName)
|
||||
{
|
||||
int status;
|
||||
PRBool status;
|
||||
char *copyOfPrompt=0;
|
||||
|
||||
/* just for safety -- really is a problem in SINGSIGN_Prompt */
|
||||
|
@ -3324,7 +3324,7 @@ SINGSIGN_DisplaySignonInfoAsHTML()
|
|||
|
||||
int
|
||||
SINGSIGN_PromptUsernameAndPassword
|
||||
(char *prompt, char **username, char **password, char *URLName)
|
||||
(char *prompt, char **username, char **password, char *URLName, PRInt32 &status)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ SINGSIGN_RememberSignonData(char* URLName, char** name_array, char** value_array
|
|||
extern void
|
||||
SINGSIGN_RestoreSignonData(char* URLName, char* name, char** value);
|
||||
|
||||
extern int
|
||||
extern PRBool
|
||||
SINGSIGN_PromptUsernameAndPassword
|
||||
(char *prompt, char **username, char **password, char *URLName);
|
||||
|
||||
|
|
|
@ -33,7 +33,6 @@ CSRCS = \
|
|||
mkconect.c \
|
||||
mkfsort.c \
|
||||
mkgeturl.c \
|
||||
singsign.c \
|
||||
mkhelp.c \
|
||||
mkmessag.c \
|
||||
mkpadpac.c \
|
||||
|
@ -48,6 +47,10 @@ CSRCS = \
|
|||
unix-dns.c \
|
||||
$(NULL)
|
||||
|
||||
CPPSRCS = \
|
||||
singsignStub.cpp \
|
||||
$(NULL)
|
||||
|
||||
ifndef MODULAR_NETLIB
|
||||
CSRCS += \
|
||||
mkinit.c \
|
||||
|
|
|
@ -65,7 +65,7 @@ OBJS= \
|
|||
.\$(OBJDIR)\prefetch.obj \
|
||||
.\$(OBJDIR)\mkgeturl.obj \
|
||||
.\$(OBJDIR)\win-dns.obj \
|
||||
.\$(OBJDIR)\singsign.obj \
|
||||
.\$(OBJDIR)\singsignStub.obj \
|
||||
$(NULL)
|
||||
|
||||
|
||||
|
@ -79,7 +79,6 @@ CSRCS = \
|
|||
mkformat.c \
|
||||
mkfsort.c \
|
||||
mkgeturl.c \
|
||||
singsign.c \
|
||||
mkhelp.c \
|
||||
mkinit.c \
|
||||
mkmessag.c \
|
||||
|
@ -98,6 +97,7 @@ CSRCS = \
|
|||
|
||||
CPPSRCS = \
|
||||
win-dns.cpp \
|
||||
singsignStub.cpp \
|
||||
$(NULL)
|
||||
|
||||
MODULE=network
|
||||
|
@ -170,6 +170,9 @@ LINCS=-I$(PUBLIC)\jtools \
|
|||
-I$(PUBLIC)\certurl \
|
||||
-I$(PUBLIC)\pop3url \
|
||||
-I$(PUBLIC)\mailbxurl \
|
||||
-I$(PUBLIC)\wallet \
|
||||
-I$(PUBLIC)\raptor \
|
||||
-I$(PUBLIC)\netlib \
|
||||
-I$(PUBLIC)\xpcom
|
||||
#!endif
|
||||
|
||||
|
|
|
@ -0,0 +1,135 @@
|
|||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
|
||||
* the License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape Communications
|
||||
* Corporation. Portions created by Netscape are Copyright (C) 1998
|
||||
* Netscape Communications Corporation. All Rights Reserved.
|
||||
*/
|
||||
|
||||
#include "libi18n.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIWalletService.h"
|
||||
static NS_DEFINE_IID(kIWalletServiceIID, NS_IWALLETSERVICE_IID);
|
||||
static NS_DEFINE_IID(kWalletServiceCID, NS_WALLETSERVICE_CID);
|
||||
|
||||
PUBLIC int
|
||||
SI_SaveSignonData(char * filename) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
PUBLIC Bool
|
||||
SI_RemoveUser(char *URLName, char *userName, Bool save) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
PUBLIC void
|
||||
SI_RemoveAllSignonData() {
|
||||
}
|
||||
|
||||
PUBLIC PRBool
|
||||
SI_PromptUsernameAndPassword
|
||||
(MWContext *context, char *prompt,
|
||||
char **username, char **password, char *URLName)
|
||||
{
|
||||
nsIWalletService *walletservice;
|
||||
nsresult res;
|
||||
PRBool status;
|
||||
res = nsServiceManager::GetService(kWalletServiceCID,
|
||||
kIWalletServiceIID,
|
||||
(nsISupports **)&walletservice);
|
||||
if ((NS_OK == res) && (nsnull != walletservice)) {
|
||||
res = walletservice->
|
||||
SI_PromptUsernameAndPassword(prompt, username, password, URLName, status);
|
||||
NS_RELEASE(walletservice);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
PUBLIC char *
|
||||
SI_PromptPassword
|
||||
(MWContext *context, char *prompt, char *URLName, Bool pickFirstUser)
|
||||
{
|
||||
nsIWalletService *walletservice;
|
||||
nsresult res;
|
||||
char * password;
|
||||
res = nsServiceManager::GetService(kWalletServiceCID,
|
||||
kIWalletServiceIID,
|
||||
(nsISupports **)&walletservice);
|
||||
if ((NS_OK == res) && (nsnull != walletservice)) {
|
||||
res = walletservice->SI_PromptPassword(prompt, &password, URLName, pickFirstUser);
|
||||
NS_RELEASE(walletservice);
|
||||
}
|
||||
return password;
|
||||
}
|
||||
|
||||
PUBLIC char *
|
||||
SI_Prompt (MWContext *context, char *prompt,
|
||||
char* defaultUsername, char *URLName)
|
||||
{
|
||||
nsIWalletService *walletservice;
|
||||
nsresult res;
|
||||
res = nsServiceManager::GetService(kWalletServiceCID,
|
||||
kIWalletServiceIID,
|
||||
(nsISupports **)&walletservice);
|
||||
if ((NS_OK == res) && (nsnull != walletservice)) {
|
||||
res = walletservice->SI_Prompt(prompt, &defaultUsername, URLName);
|
||||
NS_RELEASE(walletservice);
|
||||
}
|
||||
return defaultUsername;
|
||||
}
|
||||
|
||||
PUBLIC void
|
||||
SI_AnonymizeSignons()
|
||||
{
|
||||
}
|
||||
|
||||
PUBLIC void
|
||||
SI_UnanonymizeSignons()
|
||||
{
|
||||
}
|
||||
|
||||
PUBLIC void
|
||||
SI_DisplaySignonInfoAsHTML(MWContext *context)
|
||||
{
|
||||
}
|
||||
|
||||
#ifdef xxx
|
||||
PUBLIC void
|
||||
SI_StartOfForm() {
|
||||
}
|
||||
|
||||
PUBLIC int
|
||||
SI_LoadSignonData(char * filename) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
PUBLIC void
|
||||
SI_RememberSignonData
|
||||
(char* URLName, char** name_array, char** value_array, char** type_array, PRInt32 value_cnt)
|
||||
{
|
||||
}
|
||||
|
||||
PUBLIC void
|
||||
SI_RestoreSignonData
|
||||
(char* URLName, char* name, char** value)
|
||||
{
|
||||
}
|
||||
|
||||
PUBLIC void
|
||||
SI_RememberSignonDataFromBrowser
|
||||
(char* URLName, char* username, char* password)
|
||||
{
|
||||
}
|
||||
|
||||
#endif
|
|
@ -107,14 +107,6 @@ struct nsINetService : public nsISupports
|
|||
*/
|
||||
NS_IMETHOD SetCookieString(nsIURL *aURL, const nsString& aCookie)=0;
|
||||
|
||||
#ifdef SingleSignon
|
||||
NS_IMETHOD SI_DisplaySignonInfoAsHTML()=0;
|
||||
NS_IMETHOD SI_RememberSignonData
|
||||
(char* URLName, char** name_array, char** value_array, char** type_array, PRInt32 value_cnt)=0;
|
||||
NS_IMETHOD SI_RestoreSignonData
|
||||
(char* URLNAME, char* name, char** value)=0;
|
||||
#endif
|
||||
|
||||
#ifdef CookieManagement
|
||||
NS_IMETHOD NET_DisplayCookieInfoAsHTML()=0;
|
||||
#ifdef PrivacySiteInfo
|
||||
|
|
|
@ -746,29 +746,6 @@ nsNetlibService::SetCookieString(nsIURL *aURL, const nsString& aCookie)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
#ifdef SingleSignon
|
||||
NS_IMETHODIMP
|
||||
nsNetlibService::SI_DisplaySignonInfoAsHTML(){
|
||||
::SI_DisplaySignonInfoAsHTML(NULL);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsNetlibService::SI_RememberSignonData
|
||||
(char* URLName, char** name_array, char** value_array, char** type_array, PRInt32 value_cnt) {
|
||||
::SI_RememberSignonData(URLName, name_array, value_array, type_array, value_cnt);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsNetlibService::SI_RestoreSignonData
|
||||
(char* URLName, char* name, char** value) {
|
||||
::SI_RestoreSignonData(URLName, name, value);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef CookieManagement
|
||||
NS_IMETHODIMP
|
||||
nsNetlibService::NET_DisplayCookieInfoAsHTML(){
|
||||
|
|
|
@ -53,14 +53,6 @@ public:
|
|||
NS_IMETHOD GetCookieString(nsIURL *aURL, nsString& aCookie);
|
||||
NS_IMETHOD SetCookieString(nsIURL *aURL, const nsString& aCookie);
|
||||
|
||||
#ifdef SingleSignon
|
||||
NS_IMETHOD SI_DisplaySignonInfoAsHTML();
|
||||
NS_IMETHOD SI_RememberSignonData
|
||||
(char* URLName, char** name_array, char** value_array, char** type_array, PRInt32 value_cnt);
|
||||
NS_IMETHOD SI_RestoreSignonData
|
||||
(char* URLNAME, char* name, char** value);
|
||||
#endif
|
||||
|
||||
#ifdef CookieManagement
|
||||
NS_IMETHOD NET_DisplayCookieInfoAsHTML();
|
||||
#ifdef PrivacySiteInfo
|
||||
|
|
Загрузка…
Ссылка в новой задаче