Ignore:
Timestamp:
2010-08-11T08:08:39Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
7f34ce2
Parents:
7db65b7
Message:

Implement MSNP15 SSO (Sadistic Sign-On).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/msn/soap.h

    r7db65b7 r523fb23  
    4343"Host: %s\r\n" \
    4444"Accept: */*\r\n" \
    45 "SOAPAction: \"%s\"\r\n" \
    4645"User-Agent: BitlBee " BITLBEE_VERSION "\r\n" \
    4746"Content-Type: text/xml; charset=utf-8\r\n" \
    48 "Cookie: MSPAuth=%s\r\n" \
    49 "Content-Length: %d\r\n" \
     47"%s" \
     48"Content-Length: %zd\r\n" \
    5049"Cache-Control: no-cache\r\n" \
    5150"\r\n" \
    5251"%s"
     52
     53
     54#define SOAP_PASSPORT_SSO_URL "https://login.live.com/RST.srf"
     55#define SOAP_PASSPORT_SSO_URL_MSN "https://msnia.login.live.com/pp550/RST.srf"
     56
     57#define SOAP_PASSPORT_SSO_PAYLOAD \
     58"<Envelope xmlns=\"http://schemas.xmlsoap.org/soap/envelope/\" " \
     59   "xmlns:wsse=\"http://schemas.xmlsoap.org/ws/2003/06/secext\" " \
     60   "xmlns:saml=\"urn:oasis:names:tc:SAML:1.0:assertion\" " \
     61   "xmlns:wsp=\"http://schemas.xmlsoap.org/ws/2002/12/policy\" " \
     62   "xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\" " \
     63   "xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2004/03/addressing\" " \
     64   "xmlns:wssc=\"http://schemas.xmlsoap.org/ws/2004/04/sc\" " \
     65   "xmlns:wst=\"http://schemas.xmlsoap.org/ws/2004/04/trust\">" \
     66   "<Header>" \
     67       "<ps:AuthInfo " \
     68           "xmlns:ps=\"http://schemas.microsoft.com/Passport/SoapServices/PPCRL\" " \
     69           "Id=\"PPAuthInfo\">" \
     70           "<ps:HostingApp>{7108E71A-9926-4FCB-BCC9-9A9D3F32E423}</ps:HostingApp>" \
     71           "<ps:BinaryVersion>4</ps:BinaryVersion>" \
     72           "<ps:UIVersion>1</ps:UIVersion>" \
     73           "<ps:Cookies></ps:Cookies>" \
     74           "<ps:RequestParams>AQAAAAIAAABsYwQAAAAxMDMz</ps:RequestParams>" \
     75       "</ps:AuthInfo>" \
     76       "<wsse:Security>" \
     77           "<wsse:UsernameToken Id=\"user\">" \
     78               "<wsse:Username>%s</wsse:Username>" \
     79               "<wsse:Password>%s</wsse:Password>" \
     80           "</wsse:UsernameToken>" \
     81       "</wsse:Security>" \
     82   "</Header>" \
     83   "<Body>" \
     84       "<ps:RequestMultipleSecurityTokens " \
     85           "xmlns:ps=\"http://schemas.microsoft.com/Passport/SoapServices/PPCRL\" " \
     86           "Id=\"RSTS\">" \
     87           "<wst:RequestSecurityToken Id=\"RST0\">" \
     88               "<wst:RequestType>http://schemas.xmlsoap.org/ws/2004/04/security/trust/Issue</wst:RequestType>" \
     89               "<wsp:AppliesTo>" \
     90                   "<wsa:EndpointReference>" \
     91                       "<wsa:Address>http://Passport.NET/tb</wsa:Address>" \
     92                   "</wsa:EndpointReference>" \
     93               "</wsp:AppliesTo>" \
     94           "</wst:RequestSecurityToken>" \
     95           "<wst:RequestSecurityToken Id=\"RST1\">" \
     96               "<wst:RequestType>http://schemas.xmlsoap.org/ws/2004/04/security/trust/Issue</wst:RequestType>" \
     97               "<wsp:AppliesTo>" \
     98                   "<wsa:EndpointReference>" \
     99                       "<wsa:Address>messengerclear.live.com</wsa:Address>" \
     100                   "</wsa:EndpointReference>" \
     101               "</wsp:AppliesTo>" \
     102               "<wsse:PolicyReference URI=\"%s\"></wsse:PolicyReference>" \
     103           "</wst:RequestSecurityToken>" \
     104           "<wst:RequestSecurityToken Id=\"RST2\">" \
     105               "<wst:RequestType>http://schemas.xmlsoap.org/ws/2004/04/security/trust/Issue</wst:RequestType>" \
     106               "<wsp:AppliesTo>" \
     107                   "<wsa:EndpointReference>" \
     108                       "<wsa:Address>contacts.msn.com</wsa:Address>" \
     109                   "</wsa:EndpointReference>" \
     110               "</wsp:AppliesTo>" \
     111               "<wsse:PolicyReference xmlns=\"http://schemas.xmlsoap.org/ws/2003/06/secext\" URI=\"MBI\"></wsse:PolicyReference>" \
     112           "</wst:RequestSecurityToken>" \
     113       "</ps:RequestMultipleSecurityTokens>" \
     114   "</Body>" \
     115"</Envelope>"
     116
     117int msn_soap_passport_sso_request( struct im_connection *ic, const char *policy, const char *nonce );
    53118
    54119
Note: See TracChangeset for help on using the changeset viewer.