Loading ...
Sorry, an error occurred while loading the content.

Help with Salesforce DA

Expand Messages
  • Derek Winkler
    I m a SOAP newbie struggling with creating a Perl Soap::Lite server which can do delegated authentication with Salesforce. Was wondering if someone could help
    Message 1 of 1 , Apr 1 1:11 PM
    View Source
    • 0 Attachment
      I'm a SOAP newbie struggling with creating a Perl Soap::Lite server which
      can do delegated authentication with Salesforce.

      Was wondering if someone could help me out.

      DA works by the user logging into the Salesforce site then passing the
      username and passcode to a SOAP server at your site, then you tell them if
      it is correct returning true or false.

      Running Perl 5.8 with SOAP::Lite (not sure what version, installed with CPAN
      recently) with Apache 2.0.53.

      Keep getting this error in Apache error log when testing,

      Illegal namespace identifier 'authentication.soap.sforce.com' for URN
      'urn:authentication.soap.sforce.com' at
      /usr/local/lib/perl5/site_perl/5.8.3/SOAP/Lite.pm line 2364

      Thanks in advance for any help.

      Code follows...

      Here's the client request...

      <?xml version="1.0" encoding="UTF-8" ?>
      <soapenv:Envelope
      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
      <soapenv:Body>
      <Authenticate xmlns="urn:authentication.soap.sforce.com">
      <username>sfell@...</username>
      <password>myPassword99</password>
      <sourceIp>66.129.69.72</sourceIp>
      </Authenticate>
      </soapenv:Body>
      </soapenv:Envelope>

      and a sample response...

      <?xml version="1.0" encoding="UTF-8"?>
      <soapenv:Envelope
      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
      <soapenv:Body>
      <AuthenticateResponse
      xmlns="urn:authentication.soap.sforce.com">
      <Authenticated>false</Authenticated>
      </AuthenticateResponse>
      </soapenv:Body>
      </soapenv:Envelope>

      and my very simplistic code...

      #!/usr/local/bin/perl -w

      use SOAP::Transport::HTTP;

      SOAP::Transport::HTTP::CGI
      -> dispatch_to('Authentication')
      -> handle;

      package Authentication;

      sub Authenticate {
      my ($class, $username, $passcode, $source) = @_;
      my $respAuth='false';

      # fill in authentication code here, setting $respAuth to 'true' on
      success

      return $respAuth;
      }

      This email and any files transmitted with it are confidential and
      proprietary to Algorithmics Incorporated and its affiliates
      ("Algorithmics"). If received in error, use is prohibited. Please destroy,
      and notify sender. Sender does not waive confidentiality or privilege.
      Internet communications cannot be guaranteed to be timely, secure, error or
      virus-free. Algorithmics does not accept liability for any errors or
      omissions. Any commitment intended to bind Algorithmics must be reduced to
      writing and signed by an authorized signatory.
    Your message has been successfully submitted and would be delivered to recipients shortly.