Implementing the OpenID Provider in Perl

It may be a shot in the dark, but I'm trying to implement an OpenID provider in Perl using the Net :: OpenID :: Server module . The documentation for the entire process is confusing and sparse.

If someone successfully implemented the provider in Perl, could you insert the code snippets?

+6
perl openid openid-provider
source share
2 answers

So, I finally tweaked the installation of OpenID in place, and it works very well. I believe that I will talk in detail about some of the problems that I have encountered.

  • There are more than three states / steps in the OpenID login process. This is confusing because the documentation and sample code will lead you to the conclusion that there are three of them. There are, in some cases, up to seven. Browse your server’s logs and see how many times the SERVER and USER (those who request authentication) get into PROVIDER (which you are probably setting up). It's hard to debug something when you look at only half the interactions
  • Many vendors use the incomplete OpenID 2.0 specification. (This is slightly better.) Specification 2.0 differs from Specification 1.0; SERVER (s) establishes trust with the SUPPLIER (you). Net :: OpenID :: Server handles this gracefully, but does not tell you which specification it uses. Specification 2.0 adds a step to the connectivity process.
  • Set up your own OpenID SERVER for easy testing. I used a simple Rails server with a ruby-openid gem. It took about 10 minutes to set up a simulation of a real real server.
  • This should be taken for granted, but make sure your login process has no status. We had a global variable that handled how the user was verified. Since the use of this variable made certain assumptions that were incompatible with the OpenID login process, users were allowed to log in to accounts other than their own. Obviously, this is bad. Several closures, and we have some stateless and more secure code.

In general, OpenID is very cool as soon as you earn it.

+7
source share

Fyi, development in Net-OpenID Perl modules is starting, so you can expect a large bunch of patches and better documents to start right away. See CPAN and the openid-perl group for more details .

0
source share

All Articles