diff options
author | Piotr Piastucki <leech.miranda@gmail.com> | 2015-05-15 11:14:12 +0000 |
---|---|---|
committer | Piotr Piastucki <leech.miranda@gmail.com> | 2015-05-15 11:14:12 +0000 |
commit | 35de95108c89e489ccba2c7e8696530e396a142d (patch) | |
tree | a97cf4a8d8fa01f239084b117237aca0e9e246f0 /protocols/MSN/src/msn_auth.cpp | |
parent | cc2454c803eb6b96add654fbd99f616217056396 (diff) |
- Now only requesting OAuth tokens on SkyLogin to speed up login process, as required tokens get issued by SOAP Passport-Request anyway.
- Fixed a bug introduced by ghazan's last commit which prevented proper connecting.
git-svn-id: http://svn.miranda-ng.org/main/trunk@13601 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MSN/src/msn_auth.cpp')
-rw-r--r-- | protocols/MSN/src/msn_auth.cpp | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/protocols/MSN/src/msn_auth.cpp b/protocols/MSN/src/msn_auth.cpp index 14f2b06ec5..0f3b7a9f4d 100644 --- a/protocols/MSN/src/msn_auth.cpp +++ b/protocols/MSN/src/msn_auth.cpp @@ -583,7 +583,7 @@ static int CopyCookies(NETLIBHTTPREQUEST *nlhrReply, NETLIBHTTPHEADER *hdr) service::contacts.msn.com::MBI_SSL - Contact SOAP service -> authContactToken
service::m.hotmail.com::MBI_SSL - ActiveSync contactlist, not used by us
service::storage.live.com::MBI_SSL - Storage service (authStorageToken)
- service::skype.com::MBI_SSL - ?
+ service::skype.com::MBI_SSL - Root of all OAuth tokens
service::skype.net::MBI_SSL - ?
*/
bool CMsnProto::RefreshOAuth(const char *pszRefreshToken, const char *pszService, char *pszAccessToken, char *pszOutRefreshToken, time_t *ptExpires)
@@ -815,19 +815,17 @@ int CMsnProto::MSN_AuthOAuth(void) /* Do Login via Skype login server, if not possible switch to SkypeWebExperience login */
if ((loginRet = LoginSkypeOAuth(pRefreshToken))<1) {
if (loginRet<0) bLogin=true; else retVal = 0;
- }
-
- /* Request required tokens */
- if (RefreshOAuth(pRefreshToken, "service::ssl.live.com::MBI_SSL", szToken)) {
- replaceStr(authSSLToken, szToken);
- if (RefreshOAuth(pRefreshToken, "service::contacts.msn.com::MBI_SSL", szToken)) {
- replaceStr(authContactToken, szToken);
- if (!bLogin) {
- authMethod=retVal=1;
+ } else {
+ /* SkyLogin succeeded, request required tokens */
+ if (RefreshOAuth(pRefreshToken, "service::ssl.live.com::MBI_SSL", szToken)) {
+ replaceStr(authSSLToken, szToken);
+ if (RefreshOAuth(pRefreshToken, "service::contacts.msn.com::MBI_SSL", szToken)) {
+ replaceStr(authContactToken, szToken);
replaceStr(authUser, MyOptions.szEmail);
+ authMethod=retVal=1;
}
- } else bLogin=false;
- } else bLogin=false;
+ }
+ }
/* If you need Skypewebexperience login, as i.e. skylogin.dll is not available, we do this here */
@@ -857,6 +855,7 @@ int CMsnProto::MSN_AuthOAuth(void) pMappingContainer+=20;
UrlDecode(pMappingContainer);
replaceStr(authUIC, pMappingContainer);
+ replaceStr(authUser, MyOptions.szEmail);
MSN_GetPassportAuth();
authMethod = retVal = 2;
} else retVal = 0;
|