.Stat Data WareHouse Exit Gate - Authentication


Click here for a complete list of operations.

AuthenticateWithLogonUpdate

For authentication of external users (step n° 2)
This method must be called right after the 'GetPublicKey' method and BEFORE any other .Stat web service method is used.
Please provide the user name, domain and encrypted password as method parameters.
Use the public encryption key as returned by the 'GetPublicKey' method to encrypt the password.

.NET Example:
using System.Security.Cryptography;
RSACryptoServiceProvider rsa = new RSACryptoServiceProvider();
rsa.FromXmlString(publickey);
string encryptedpassword = Convert.ToBase64String(rsa.Encrypt(System.Text.Encoding.Unicode.GetBytes(password), false));

If you have been successfully authenticated then the method returns a string with your session ID and updates the username, otherwise an exception is thrown.
Provide this session ID, your updated user name and the domain to all other .Stat web service methods as parameters in the SOAP header.

Test

The test form is only available for requests from the local machine.

SOAP 1.1

The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.

POST /OECDStatWS_Authentication/OECDStatWS_Authentication.asmx HTTP/1.1
Host: stats.oecd.org
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://stats.oecd.org/OECDStatWS/Authentication/AuthenticateWithLogonUpdate"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header>
    <RequesterInfoSoapHeader xmlns="http://stats.oecd.org/OECDStatWS/Authentication/">
      <RequestingApplication>string</RequestingApplication>
      <SessionToken>string</SessionToken>
      <UserIdentityDomain>string</UserIdentityDomain>
      <UserIdentityUserName>string</UserIdentityUserName>
    </RequesterInfoSoapHeader>
  </soap:Header>
  <soap:Body>
    <AuthenticateWithLogonUpdate xmlns="http://stats.oecd.org/OECDStatWS/Authentication/">
      <logon>string</logon>
      <domain>string</domain>
      <encryptedpassword>string</encryptedpassword>
    </AuthenticateWithLogonUpdate>
  </soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <AuthenticateWithLogonUpdateResponse xmlns="http://stats.oecd.org/OECDStatWS/Authentication/">
      <AuthenticateWithLogonUpdateResult>string</AuthenticateWithLogonUpdateResult>
      <logon>string</logon>
    </AuthenticateWithLogonUpdateResponse>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.

POST /OECDStatWS_Authentication/OECDStatWS_Authentication.asmx HTTP/1.1
Host: stats.oecd.org
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Header>
    <RequesterInfoSoapHeader xmlns="http://stats.oecd.org/OECDStatWS/Authentication/">
      <RequestingApplication>string</RequestingApplication>
      <SessionToken>string</SessionToken>
      <UserIdentityDomain>string</UserIdentityDomain>
      <UserIdentityUserName>string</UserIdentityUserName>
    </RequesterInfoSoapHeader>
  </soap12:Header>
  <soap12:Body>
    <AuthenticateWithLogonUpdate xmlns="http://stats.oecd.org/OECDStatWS/Authentication/">
      <logon>string</logon>
      <domain>string</domain>
      <encryptedpassword>string</encryptedpassword>
    </AuthenticateWithLogonUpdate>
  </soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <AuthenticateWithLogonUpdateResponse xmlns="http://stats.oecd.org/OECDStatWS/Authentication/">
      <AuthenticateWithLogonUpdateResult>string</AuthenticateWithLogonUpdateResult>
      <logon>string</logon>
    </AuthenticateWithLogonUpdateResponse>
  </soap12:Body>
</soap12:Envelope>