Bob's Notepad

Notes on projects I have done and things I have learned saved for my reference and for the world to share

Monday, January 07, 2008

Doing your own OpenID authentication

OpenID is an open standard for authentication on various, unrelated, websites. There are many providers that will provide you with an OpenID idenity but, in some ways, this defeates the purpose of OpenID since your ID is controlled by a person other than you. Just last night I ran into a situation where I was not able to do something with my ID that I wanted since I was using because I am not in control of my idenity page. Thanks to a fit of insomnia I did some research and implemented my own OpenID idenity -- and it was actually a lot easier than I expected.

In order to implemt this you need a website with PHP support. This can be done on any web server whether you are in control of it or not but it is recommended that it be a server you are in control of for obvious security reasons. We will use phpMyID since it is simple and serves the purpose well.

This works well if it has its own domain or subdomain but it really isn't a required thing. The OpenID that I created is My instructions assume you've created a domain or sub-domain for your OpenID but you can adapt as needed.

First thing, you need to register a domain and point that domain's DNS to your webserver and, of course, configure your webserver. I'm not going to touch on that because if you're doing this you probably should already know how and if not there are plenty of web pages out there that can help you with that.

Now you want to grab phpMyID. The latest version is 0.7 BETA and can be found here.

For me, I have my own server with shell access so I downloaded this directly to my server. This is, by far, the easiest method of implementing this but not everyone has this access so you can download it to your local machine, do the edits and then upload the files to your webserver. If you are uploading keep in mind that when I say editing a file you need to edit it and upload it if your not on the server.

There are 2 files that make up phpMyID. Really, that's it. Your OpenID set up is going to use only 2 php files. Let's get started:

  1. Put both files from the archive into your public_html or www directory
  2. Rename MyID.config.php to index.php
  3. Edit index.php and change "auth_username", "auth_password", and "auth_realm"
    • auth_realm doesn't need to be changed but can be anything you want it to be
    • auth_username is the username you want to authenticate as - this is for your use only
    • auth_password is an encrypted password which you can use OpenSSL to create (echo -n 'username:realm:password' | openssl md5).
      • Make sure you replace username and realm in the command with the same as used in auth_realm and auth_username
      • Windows User? Check here

  4. To use SREG, remove hash (#) marks from the values under the sreg array and replace the values with appropriate information. This allows these fields to be automagically filled in when logging into a site
  5. Save the file
You now have a working OpenID service. But if your OpenID is pointing to your OpenID then it would make sense to have some information about yourself on that page, wouldnt it? The PHP script doesnt allow any easy way of editing your page but it's something that may well be desired. You may ever want to use other Web 2.0 features like a pavatar. Let's make an easy way of doing this.
  1. First, create a file to contain your HTML code. We'll use "id.html" in this example.
  2. In this file you'll want to create your HTML page as you wish. Do not include body or html tags as we're going to leave the headers and such to the PHP script and then just inject this file in the middle.
  3. Open MyID.php in your favorite editor and go to line 1392
  4. Following the function call and the header information you will see some HTML code. Under the body tag we want to add the following:

    echo '

  5. Now look for the title tags above that. You can change the title to whatever you'd like the name of your OpenID page to be.

You should be all set and have an easier way to edit the information on your OpenID page.

Optionally, you may want to give credit to the author of phpMyID. You can place an HTML link before the close body tag in MyID.php.

Labels: ,

Reference Link


Blogger Rahul said...

Hello Admin, thank you for enlightening us with your knowledge sharing. PHP has become an inevitable part of web development, and with proper best PHP training in Chennai, one can have a strong career in the web development field.

22/10/15 7:54 AM  
Anonymous Anonymous said...

Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic.
angularjs online Training

angularjs Training in marathahalli

angularjs interview questions and answers

angularjs Training in bangalore

angularjs Training in bangalore

angularjs online Training

30/10/18 8:35 AM  
Blogger Unknown said...

I am a regular reader of your blog and being students it is great to read that your responsibilities have not prevented you from continuing your study and other activities. Love
Java interview questions and answers

Java training in Chennai | Java training institute in Chennai | Java course in Chennai

Java training in Bangalore | Java training institute in Bangalore | Java course in Bangalore

Java interview questions and answers

2/11/18 3:36 AM  
Blogger Unknown said...

This is beyond doubt a blog significant to follow. You’ve dig up a great deal to say about this topic, and so much awareness. I believe that you recognize how to construct people pay attention to what you have to pronounce, particularly with a concern that’s so vital. I am pleased to suggest this blog.
online Python training
python training in chennai

3/11/18 3:01 AM  
Blogger jeeva said...

Inspiring writings and I greatly admired what you have to say , I hope you continue to provide new ideas for us all and greetings success always for you..Keep update more information.

rpa training in chennai
rpa training in bangalore
rpa course in bangalore
best rpa training in bangalore
rpa online training

3/11/18 5:45 AM  
Blogger gowsalya said...

Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.
Devops Training courses
Devops Training in Bangalore
Best Devops Training in pune
Devops interview questions and answers

8/11/18 2:27 AM  
Blogger shalinipriya said...

Thank you for benefiting from time to focus on this kind of, I feel firmly about it and also really like comprehending far more with this particular subject matter. In case doable, when you get know-how, is it possible to thoughts modernizing your site together with far more details? It’s extremely useful to me.
Data Science training in rajaji nagar | Data Science Training in Bangalore
Data Science with Python training in chennai
Data Science training in electronic city
Data Science training in USA
Data science training in pune

8/11/18 2:59 AM  
Blogger Unknown said...

I am really happy with your blog because your article is very unique and powerful for new reader.
Click here:
selenium training in chennai | selenium course in chennai
selenium training in bangalore | selenium course in bangalore
selenium training in Pune | selenium course in pune | selenium class in pune
selenium training in Pune | selenium course in pune | selenium class in pune
selenium online training | selenium training online | online training on selenium

8/11/18 6:20 AM  
Blogger alex said...

Have questions about your online casino? Follow the link and find out everything that interests you. best online gambling guide Play with us and win every hour.

9/1/19 9:37 AM  
Blogger jvimala said...

Informative Blog, Thank you to share this
Best Devops Training in Chennai | Best Devops Training Institute in Chennai

5/2/19 6:00 AM  
Blogger Belago said...

Бытовая и профессиональная светодиодная лента 12в и 24 вольта, я знаю где брать, лучшее на Экодио

18/2/19 5:57 AM  
Blogger Kavi said...

Thank you for sharing such valuable information about devops trainining.glad to see this here.keep sharing
Devops Training in Chennai | Devops Training Institute in Chennai

1/3/19 1:36 AM  
Blogger Raji said...

Excellent content thanks for sharing the unique information and keep posting.

Devops Training in Chennai | Devops Training Institute in Chennai

1/3/19 5:17 AM  
Blogger Madhu Balan said...

Superb. I really enjoyed very much with this article here. Really it is an amazing article I had ever read. I hope it will help a lot for all. Thank you so much for this amazing posts and please keep update like this excellent article.thank you for sharing such a great blog with us. expecting for your.
Java Training in Chennai
Java Training in Coimbatore
Java Training in Bangalore

13/8/19 3:41 AM  
Blogger ruhi said...

Awesome article! You are providing us very valid information. This is worth reading. Keep sharing more such articles.
Automation Anywhere Training in Chennai
Automation courses in Chennai
Machine Learning Training in Chennai
Blue Prism Training in Chennai
UiPath Training in Chennai
Automation Anywhere Training in OMR
Automation Anywhere Training in Porur
Automation Anywhere Training in T Nagar
Automation Anywhere Training in Velachery

14/8/19 2:12 AM  
Blogger Riya Raj said...

Phenomenal Blog!!! thanks for your post and awaiting for your new updates...
Digital Marketing Course in Chennai
Digital Marketing Training in Chennai
Digital Marketing Training
Digital Marketing Course
Digital marketing course in Tambaram
Digital marketing course in Guindy
Python Training in Chennai
Big data training in chennai
SEO training in chennai
JAVA Training in Chennai

14/8/19 2:41 AM  
Blogger Rahuldevan said...

Thanks for sharing informative article with us..
QTP Training in Chennai
qtp course in chennai
best qtp training in chennai
QTP Training in Tambaram
QTP Training in OMR
LoadRunner Training in Chennai
Html5 Training in Chennai
clinical sas training in chennai
Spring Training in Chennai
Photoshop Classes in Chennai

14/8/19 3:10 AM  
Blogger shwethapriya said...

This is an awesome post.Really very informative and creative contents.
IELTS Coaching in Chennai
Best IELTS Coaching in Chennai
French Language Classes in Chennai
pearson vue exam centers in chennai
Informatica MDM Training in Chennai
Hadoop Admin Training in Chennai
IELTS Coaching in Tambaram
IELTS Coaching in Anna Nagar

14/8/19 7:50 AM  
Blogger Sivanandhana Girish said...

Your blog is nice. I believe this will surely help readers who are really in need of this vital piece of information. Thanks for sharing and kindly keep updating.
Spoken English Classes in Chennai
Spoken English Class in Chennai
Spoken English in Chennai
IELTS Training in Chennai
IELTS Chennai
Best English Speaking Classes in Mumbai
Spoken English Classes in Mumbai
IELTS Mumbai
IELTS Coaching in Anna Nagar
Spoken English Class in T Nagar

17/8/19 2:39 AM  
Blogger Sadhana Rathore said...

I want to thank for sharing this blog, really great and informative. Share more stuff like this.
Ethical Hacking course in Chennai
Ethical Hacking Training in Chennai
Hacking course
ccna course in Chennai
Salesforce Training in Chennai
Angular 7 Training in Chennai
Web Designing course in Chennai
Ethical Hacking course in Thiruvanmiyur
Ethical Hacking course in Porur
Ethical Hacking course in Adyar

17/8/19 2:42 AM  
Blogger Reshma said...

Thanks for sharing this nice article. It is really helpful for me. Keep sharing like this..
Python Training in Velachery
Python Training in T Nagar
Python Training in Tambaram
Python Training in Adyar
Python Training in Anna Nagar
Python Training in OMR
Python Training in Porur
python Training in vadapalani
python Training in Thiruvanmiyur

19/8/19 3:10 AM  
Blogger Hari said...

Your post is very informative. It is helpful to develop my skills in the right way. Persist the great work.
Placement Training in Chennai
Placement Training centres in Chennai
Oracle DBA Training in Chennai
Oracle Training in Chennai
Tableau Training in Chennai
Pega Training in Chennai
Job Openings in Chennai
Linux Training in Chennai
Corporate Training in Chennai
Social Media Marketing Courses in Chennai
Placement Training in Adyar

19/8/19 8:17 AM  
Blogger sasi said...

Great experience for me by reading this blog. Nice article.
Tally Course in anna nagar
Tally Course in Chennai
Tally Course in OMR
PHP Training in OMR
German Classes in T Nagar
Tally Course in T Nagar
IELTS Coaching in OMR
DevOps Training in T Nagar

22/8/19 1:18 AM  
Blogger Prakash said...

Good blog!!! It is more impressive... thanks for sharing with us...
Selenium Training in Chennai
best selenium training in chennai
selenium classes in chennai
best selenium training in chennai
Selenium training in Adyar
Selenium Training in Tnagar
Big data training in chennai
Hadoop training in chennai
Digital Marketing Course in Chennai
JAVA Training in Chennai

29/8/19 8:10 AM  
Blogger easylearn said...

Good job & thank you very much for the new information, i learned something new. Very well written. It was sooo good to read and usefull to improve knowledge. Who want to learn this information most helpful. One who wanted to learn this technology IT employees will always suggest you take Big Data Hadoop Online Training Courses.

21/9/19 3:17 AM  
Blogger Vijiaajith said...


6/10/19 7:18 AM  
Blogger Vijiaajith said...






6/10/19 7:22 AM  
Blogger Padminiprwatech said...

Thanks a lot for giving great kind of information. So useful and practical for me. Excellent blog and very informative, nice work keep updating. If you are looking for any Big data related information, check our bigdata training institute in bangalore web page. Thanks a lot.

2/12/19 2:30 AM  
Blogger shreeya karan said...

Nice blog!!!
Internships in pune for computer science students
Internships in pune for computer science students
Inplant training certificate format
Internships in bangalore for ece students
Industrial training for electronics and communication engineering students
Internship for computer science students in bangalore
Internship for ece students
Mba internship in chennai
Inplant training in chennai for ece
Internship in nagpur for cse

19/12/19 12:49 AM  
Anonymous amit tavva said...

keep up the good work. this is an Assam post. this to helpful, i have reading here all post. i am impressed. thank you. this is our digital marketing training center. This is an online certificate course
digital marketing training in bangalore |

1/1/20 8:57 AM  
Blogger lokesh said...

Excellent blog thanks for sharing the valuable information...
Data Science Course in Chennai
Data Science Courses in Bangalore
Data Science Course in Coimbatore
Data Science Course in Hyderabad
Data Science Training in BTM
Data Science Training in Marathahalli
Data Science Course in Marathahalli
Best Data Science Training in Marathahalli
DOT NET Training in Bangalore
PHP Training in Bangalore

24/1/20 7:04 AM  
Blogger shreekavi said...

Really awesome blog. Your blog is really useful for me. Thanks for sharing this informative blog.
Software Testing Training in Chennai
Software Testing Training in Bangalore
Software Testing Course in Coimbatore
Software Testing Training in Madurai
Software Testing Training Institute in Bangalore
Software Testing Course in Bangalore
Testing Course in Bangalore
Ethical hacking course in bangalore

25/2/20 2:31 AM  
Blogger nizam said...

It is really informative and useful blog..

18/5/20 5:42 AM  
Blogger Rashika said...

Nice Post! Thank you for sharing very good post, it was so Nice to read and useful to improve my knowledge as updated one, keep blogging.
AWS training in chennai | AWS training in annanagar | AWS training in omr | AWS training in porur | AWS training in tambaram | AWS training in velachery

23/5/20 10:29 AM  

Post a Comment

<< Home