Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 533
  • Last Modified:

Implementing SOAP based OpenID in PHP

Hello.  This is my first question on this forum.

I need to find a good PHP library for implementing SOAP based OpenID.  Preferably this will be with an object oriented design using classes.  And part of the definition of "good" is that this library is supported on an ongoing basis.

Does anyone out here have experience with any of the available libraries and have any recommendations?

Thanks!
0
Russ_Kauk
Asked:
Russ_Kauk
  • 3
  • 3
1 Solution
 
Ray PaseurCommented:
Personally, I avoid SOAP whenever I can.  A RESTful interface is always preferable, for a variety of reasons.  But that said, you might find some good examples in the Google Code library.  Some of the results of this search could be helpful, too.
http://lmgtfy.com?q=OpenID+PHP+SOAP
0
 
Russ_KaukAuthor Commented:
Ray,

Thanks for your comment.  Having spent a considerable amount of time developing a SOAP interface for my customer to a legacy database via that products API, I'm hesitant to jump in right now and learn yet another new software technology - I am not conversant with the RESTful interface.

The customer desires to develop an OpenID login that utilizes their corporate headquarters as the ID service provider.  As happens sometimes, this project is somewhat underfunded so my preference was to stay with that with which I am already familiar.

I've checked out the list of PHP based OpenID solutions at http://wiki.openid.net/w/page/12995176/Libraries.  Since there are already a number of available options, I was hoping to short-cut my own ramp up time and utilize the expertise within this group to determine which of these solutions have been used, if any are SOAP based, how well they are written and supported, etc.

I will, however, check out your suggestion to look at any Google libraries.

~ Russ
0
 
Ray PaseurCommented:
Good luck with it.  You can find some pretty good examples of how REST works just about anywhere.  The client-server implementation that powers the WWW is a RESTful design.  The reason it is so popular is that there is almost nothing to learn!  This article tells much more than you need to know to use it.
http://en.wikipedia.org/wiki/Representational_State_Transfer

To show you how easy it is to use the REST design pattern, consider the code snippet.  It is a complete implementation of a RESTful interface.  Put that behind HTTPS and your API key will be safe.

This might be a useful place to get information and share ideas.
http://openid.net/developers/dev-mailing-lists/

Of those things listed for PHP, my instincts would lead me away from PHPClasses and toward these:
http://framework.zend.com/manual/en/zend.openid.html
http://www.janrain.com/openid-enabled

This appears to be fairly new, but there have been a lot of downloads and no outstanding bug reports.  Has a good list of dependencies:
http://pear.php.net/package/OpenID/

You might also want to follow this guy's work, or at least waste a moment on the very enjoyable video mashup halfway down the page.
http://staynalive.com/
<?php // RAY_REST_get_last_name.php
error_reporting(E_ALL);



// DEMONSTRATE HOW A RESTFUL WEB SERVICE WORKS
// INPUT FIRST NAME, OUTPUT LAST NAME
// CALLING EXAMPLE:
// file_get_contents('http://laprbass.com/RAY_REST_get_last_name.php?key=ABC&resp=XML&name=Ray');



// OUR DATA MODEL CONTAINS ALL THE ANSWERS - THIS COULD BE A DATA BASE - AS SIMPLE OR COMPLEX AS NEEDED
$dataModel
= array
( 'Brian'   => 'Portlock'
, 'Ray'     => 'Paseur'
, 'Richard' => 'Quadling'
, 'Dave'    => 'Baldwin'
)
;


// SHOULD RESPONSE BE PLAIN TEXT OR XML FORMAT
$alpha = '';
$omega = '';
if ( (isset($_GET["resp"])) && ($_GET["resp"] == 'XML') )
{
    $alpha = '<response>';
    $omega = '</response>';
}



// TEST THE API KEY
$key = FALSE;

// IF THE URL CONTAINS THE KEY
if (isset($_GET["key"])) $key = $_GET["key"];

// IF THE KEY FAILS TO MATCH OUR OUR REQUIRED 'ABC'
if ($key !== 'ABC') die($alpha . 'BOGUS API KEY' . $omega);



// LOOK UP THE LAST NAME
$name="?";

// IF THE URL CONTAINS THE FIRST NAME
if (isset($_GET["name"])) $name = $_GET["name"];

// IF THE URL NAME IS FOUND IN THE DATA MODEL
if (array_key_exists($name, $dataModel))
{
    // RETURNS THE LAST NAME FROM THE DATA MODEL
    die($alpha . "$dataModel[$name]" . $omega);
}

// RETURNS THE UNKNOWN NAME INDICATOR
else die($alpha . 'UNKNOWN' . $omega);

Open in new window

0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
Russ_KaukAuthor Commented:
It appears that I am not going to get any further responses on this question.

To be fair, Ray did provide some good information on REST and some additional suggestions regarding where to research SOAP.

But, on the other hand, I needed specifically some information on existing PHP SOAP based SSO libraries from anyone who had used them and could give me some good advice one direction or another based on their practical experience and to that end I did not receive an answer here.

I was hoping to avoid what is going to be many hours of research and learning time on an already tight project budget and, again, did not receive any information here that will short circuit that process.

Thanks to all who read through the question and good luck to anyone else who may stumble upon this needing similar information!
0
 
Ray PaseurCommented:
Best of luck, Russ.  Your experience with SOAP is exactly why knowledgeable professionals avoid SOAP.
0
 
Russ_KaukAuthor Commented:
Although somewhat interesting, the information provided in posts other than mine did not answer my original question - thus it would be inappropriate to recognize those posts as a solution.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now