Solved

Implementing SOAP based OpenID in PHP

Posted on 2010-11-08
6
481 Views
Last Modified: 2012-06-21
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
Comment
Question by:Russ_Kauk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 34136993
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
 

Author Comment

by:Russ_Kauk
ID: 34137710
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
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 34138386
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
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!

 

Accepted Solution

by:
Russ_Kauk earned 0 total points
ID: 34234976
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
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 34235471
Best of luck, Russ.  Your experience with SOAP is exactly why knowledgeable professionals avoid SOAP.
0
 

Author Closing Comment

by:Russ_Kauk
ID: 34272865
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
This article discusses how to create an extensible mechanism for linked drop downs.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question