mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=10944
This commit is contained in:
parent
52daecfff6
commit
3c345871de
|
@ -8916,6 +8916,7 @@ Charlie 17 Aug 2006
|
|||
x_opengl.C
|
||||
client/
|
||||
hostinfo_unix.C
|
||||
|
||||
Milos 17 Aug 2006
|
||||
- changed the way wxFlatNotebook is initialized when there is no work present.
|
||||
Added routing to intialize notebook to default values.Introduced Freeze()
|
||||
|
@ -8949,3 +8950,28 @@ Charlie 17 Aug 2006
|
|||
mac_build/
|
||||
boinc.xcodeproj/
|
||||
project.pbxproj
|
||||
|
||||
Rom 18 Aug 2006
|
||||
- boincmgr - Add support for detecting an authenticator via a "Setup" cookie
|
||||
from the projects master URL. With this, and the project_init.xml file
|
||||
specified for a customized installer will allow for a handsfree install
|
||||
scenario.
|
||||
|
||||
project_init.xml just needs to contain the project name and master url, the
|
||||
website sets a cookie named "Setup" with the desired authenticator and
|
||||
a reasonable timeout, like 30 minutes, and the attach to project wizard will
|
||||
automatically attach to the project and get work.
|
||||
|
||||
NOTE: This only works if the participant is using Internet Explorer.
|
||||
|
||||
clientgui/
|
||||
ProjectProcessingPage.cpp
|
||||
WizardAttachProject.cpp, .h
|
||||
clientlib/win/
|
||||
AuthenticatorDetection.cpp, .h
|
||||
stdafx.h
|
||||
win_build/
|
||||
boinc_dll.vcproj
|
||||
boinc_dll_2003.vcproj
|
||||
|
||||
|
|
@ -377,10 +377,11 @@ void CProjectProcessingPage::OnStateChange( CProjectProcessingPageEvent& WXUNUSE
|
|||
|
||||
ai->url = (const char*)pWAP->m_ProjectInfoPage->GetProjectURL().mb_str();
|
||||
|
||||
if (!pWAP->m_AccountKeyPage->m_strAccountKey.IsEmpty() ||
|
||||
pWAP->m_bCredentialsCached
|
||||
if (!pWAP->m_AccountKeyPage->m_strAccountKey.IsEmpty() ||
|
||||
pWAP->m_bCredentialsCached ||
|
||||
pWAP->m_bCredentialsDetected
|
||||
) {
|
||||
if (!pWAP->m_bCredentialsCached) {
|
||||
if (!pWAP->m_bCredentialsCached || pWAP->m_bCredentialsDetected) {
|
||||
ao->authenticator = (const char*)pWAP->m_AccountKeyPage->m_strAccountKey.mb_str();
|
||||
}
|
||||
SetProjectCommunitcationsSucceeded(true);
|
||||
|
|
|
@ -50,6 +50,9 @@
|
|||
#include "res/attachprojectwizard.xpm"
|
||||
////@end XPM images
|
||||
|
||||
#ifdef __WXMSW__
|
||||
EXTERN_C BOOL DetectSetupAuthenticator(LPCSTR szProjectURL, LPSTR szAuthenticator, LPDWORD lpdwSize);
|
||||
#endif
|
||||
|
||||
/*!
|
||||
* CWizardAttachProject type definition
|
||||
|
@ -130,6 +133,7 @@ bool CWizardAttachProject::Create( wxWindow* parent, wxWindowID id, const wxPoin
|
|||
project_url = wxEmptyString;
|
||||
project_authenticator = wxEmptyString;
|
||||
m_bCredentialsCached = false;
|
||||
m_bCredentialsDetected = false;
|
||||
|
||||
wxString strTitle;
|
||||
if (wxGetApp().GetBrand()->IsBranded()) {
|
||||
|
@ -266,7 +270,27 @@ bool CWizardAttachProject::Run( wxString& WXUNUSED(strName), wxString& strURL, b
|
|||
m_bCredentialsCached = bCredentialsCached;
|
||||
}
|
||||
|
||||
if ( strURL.Length() && bCredentialsCached && m_ProjectProcessingPage) {
|
||||
#ifdef __WXMSW__
|
||||
|
||||
// If credentials are not cached, then we should try one last place to look up the
|
||||
// authenticator. Some projects will set a "Setup" cookie off of their URL with a
|
||||
// pretty short timeout. Lets take a crack at detecting it.
|
||||
//
|
||||
// Only Internet Explorer is supported at this time.
|
||||
//
|
||||
if (!bCredentialsCached) {
|
||||
TCHAR szAuthenticator[512];
|
||||
DWORD dwSize = sizeof(szAuthenticator)/sizeof(TCHAR);
|
||||
|
||||
if (DetectSetupAuthenticator(strURL.mbc_str(), szAuthenticator, &dwSize)) {
|
||||
m_bCredentialsDetected = true;
|
||||
m_AccountKeyPage->m_strAccountKey = szAuthenticator;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
if ( strURL.Length() && (bCredentialsCached || m_bCredentialsDetected) && m_ProjectProcessingPage) {
|
||||
return RunWizard(m_ProjectProcessingPage);
|
||||
} else if (strURL.Length() && !bCredentialsCached && m_ProjectPropertiesPage) {
|
||||
return RunWizard(m_ProjectPropertiesPage);
|
||||
|
|
|
@ -125,6 +125,7 @@ public:
|
|||
CErrProxyPage* m_ErrProxyPage;
|
||||
////@end CWizardAttachProject member variables
|
||||
bool m_bCredentialsCached;
|
||||
bool m_bCredentialsDetected;
|
||||
wxString strProjectName;
|
||||
};
|
||||
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
// Berkeley Open Infrastructure for Network Computing
|
||||
// http://boinc.berkeley.edu
|
||||
// Copyright (C) 2005 University of California
|
||||
//
|
||||
// This is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation;
|
||||
// either version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This software is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
// See the GNU Lesser General Public License for more details.
|
||||
//
|
||||
// To view the GNU Lesser General Public License visit
|
||||
// http://www.gnu.org/copyleft/lesser.html
|
||||
// or write to the Free Software Foundation, Inc.,
|
||||
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "Identification.h"
|
||||
|
||||
|
||||
/**
|
||||
* Detect what authenticator to use from the current users cookie cache.
|
||||
*
|
||||
* A project will assign an authenticator from some web based signup system as part
|
||||
* of their HTTP cookie, from there we can query Internet Explorer and get the
|
||||
* authenticator and use it during the attach to project wizard execution.
|
||||
*
|
||||
* Internet Explorer is the only browser supported at present.
|
||||
**/
|
||||
EXTERN_C __declspec(dllexport) BOOL DetectSetupAuthenticator(LPCTSTR szProjectURL, LPTSTR szAuthenticator, LPDWORD lpdwSize)
|
||||
{
|
||||
BOOL bReturnValue = FALSE;
|
||||
TCHAR szCookie[2048];
|
||||
DWORD dwSize = sizeof(szCookie)/sizeof(TCHAR);
|
||||
|
||||
bReturnValue = InternetGetCookieEx(szProjectURL, _T("Setup"), szCookie, &dwSize, INTERNET_COOKIE_THIRD_PARTY, NULL);
|
||||
if (bReturnValue)
|
||||
{
|
||||
_tcsncpy(szAuthenticator, _tcsstr(szCookie, TEXT("=")) + 1, *lpdwSize);
|
||||
*lpdwSize = (DWORD)_tcslen(szAuthenticator);
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr, TEXT("DetectSetupAuthenticator() - InternetGetCookieEx Failed. GetLastError = '%d'"), GetLastError());
|
||||
}
|
||||
|
||||
return bReturnValue;
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
// Berkeley Open Infrastructure for Network Computing
|
||||
// http://boinc.berkeley.edu
|
||||
// Copyright (C) 2005 University of California
|
||||
//
|
||||
// This is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation;
|
||||
// either version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This software is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
// See the GNU Lesser General Public License for more details.
|
||||
//
|
||||
// To view the GNU Lesser General Public License visit
|
||||
// http://www.gnu.org/copyleft/lesser.html
|
||||
// or write to the Free Software Foundation, Inc.,
|
||||
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
#pragma once
|
||||
|
||||
EXTERN_C __declspec(dllexport) BOOL DetectSetupAuthenticator(LPCTSTR szProjectURL, LPTSTR szAuthenticator, LPDWORD lpdwSize);
|
|
@ -41,6 +41,7 @@
|
|||
#include <EventSys.h>
|
||||
#include <wininet.h>
|
||||
#include <crtdbg.h>
|
||||
#include <tchar.h>
|
||||
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
|
|
|
@ -412,6 +412,10 @@
|
|||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\clientlib\win\AuthenticatorDetection.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\clientlib\win\boinc_dll.cpp"
|
||||
>
|
||||
|
@ -478,6 +482,10 @@
|
|||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\clientlib\win\AuthenticatorDetection.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\clientlib\win\boinc_dll.h"
|
||||
>
|
||||
|
|
|
@ -159,7 +159,7 @@
|
|||
PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_USRDLL;_ATL_ATTRIBUTES"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="3"
|
||||
WarningLevel="4"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
|
@ -287,6 +287,9 @@
|
|||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath="..\clientlib\win\AuthenticatorDetection.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\clientlib\win\boinc_dll.cpp">
|
||||
</File>
|
||||
|
@ -337,6 +340,9 @@
|
|||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||
<File
|
||||
RelativePath="..\clientlib\win\AuthenticatorDetection.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\clientlib\win\boinc_dll.h">
|
||||
</File>
|
||||
|
|
Loading…
Reference in New Issue