Steven Viola

Adventures of a Computer Engineer

RSS FeedFollow me on TwitterFollow me on Google BuzzContact me on FacebookStories I DuggMy shared items in Google ReaderWhat I have been Listening toHire me on LinkedIn

  • Home
  • Resume

Open ID type login for Binghamton PODS

Aug 10th

Posted by Steven Viola in PHP

No comments

For many years, I have been a big supporter of Open ID log in. Recently when making an online site for Dickinson Town Council, it became apparent that users will have to authenticate themselves. Rather than having the users create a separate account, I realized all the users will be Binghamton student and faculty, which means they all have a PODS user name and password. Of course this system of verifying the users identity is much more convenient to the user, because they use information they already know, and do not have to create a new account for my site.

Michael Head informed me that Computer Science Graduate Student Organization (GSOCS) uses this type of log on and put me in contact with Michael Hines, who wrote the PODS authentication hack for the GSOCS site. Fortunately for me, Michael Hines has posted well documented code on how to accomplish Wget Authentication. By simply setting the $wgetDomainURLS to username:password@busi.binghamton.edu/bannerlogin, when a user presents his/her credentials, to the script, it tries logging onto busi, and if it works, returns true, or false on a bad log in combination.

To extend this script further, i proceeded to get more information by using Binghamton’s Telecommunication Database by visiting http://www.telecom.binghamton.edu/directory/directory.results?search=username, you should be presented with just one result, which is the person who just logged in. You can parse this result for the first and last name, and even a phone number if one is provided. For some results, it is ambiguous if a part of the name is a middle name, or a last name of two names, separated by a space. Luckily, telecommunications has added vCards for all the users, which clearly specifies which part of the name is the first name and which is the last. This format is also much easier to parse than HTML.


$url="http://www.telecom.binghamton.edu/directory/directory.results?search=$usrnme";
$page=file_get_contents($url);
$pos=strpos($page,"/directory/directory.profile?id=");
$special_number=substr($page,$pos+32,32);
$url="http://www.telecom.binghamton.edu/directory/directory.vcard?id=$special_number";
$vCard=file_get_contents($url);
$vCard_Contents=explode(':',$vCard);
$last=strtok($vCard_Contents[3],';');
$first=strtok(';');

I have attached a PHP script that will prompt a user for his/her credentials, and upon a successful log on, either logs the returning user in, or for a new user, gets the information from telecommunications, and seamlessly logs the user in. This reduces a lot of the hassle of having the user present his/her personal information and create a new account. Users will especially like that they don’t have to verify their e-mail address or if they are human, it just works. Hope this helps in some way.

Binghamton, PHP, PODS, Programing

tweet

Two more weeks, then back in Binghamton. How the time flies when you’re having fun.
Rant, Syndication, twitter

tweet

It’s too late. I should stop watching King of the Hill and get to bed already. Programming can twit till tomorrow.
Rant, Syndication, twitter

tweet

I’ve only got 31 GB left on my 1TB hard drive. Looks like I’m ready for another. Good thing they’re so cheap. http://tinyurl.com/7svpfu
Rant, Syndication, twitter

tweet

I can’t believe gmail is finally out of beta. It’s weird seeing the logo without the beta sticker. At least “Back to Beta” puts it back..
Rant, Syndication, twitter

tweet

Ok, It’s official. My new Google Voice phone number is (646) STEVE-42 – ((646) 783-8342). (516) 882-7644 will expire in 90 days, so update.
Rant, Syndication, twitter

tweet

Hmm, should I change my Google Voice phone number to (646)-STEVE-42 ? Let me know If you think it’s wort $10 or not. http://google.com/voice
Rant, Syndication, twitter

tweet

Gonna enjoy a late night dinner of noodles. Why are they so delicious? I hear in Europe, they have late dinners, so im just being European.
Rant, Syndication, twitter

tweet

RT @donttrythis Proceeds from the sale of said hardware to go to the excellent Electronic Frontier Foundation! http://tinyurl.com/mwszmc
Rant, Syndication, twitter

tweet

Goal for the next week or so: Finish the first 50 Project Euler problem. Only 15 more to go. http://projecteuler.net
Rant, Syndication, twitter
« First...«23456»...Last »
  • Archives

    • July 2010
    • June 2010
    • May 2010
    • April 2010
    • March 2010
    • February 2010
    • January 2010
    • November 2009
    • October 2009
    • September 2009
    • August 2009
    • July 2009
    • June 2009
    • May 2009
    • April 2009
    • March 2009
    • February 2009
    • August 2008
    • July 2008
    • June 2008
  • Categories

    • Google Reader
    • Hardware
    • Nixie
    • PCB
    • PHP
    • Programing
    • Rant
    • Syndication
    • Twitter
    • Uncategorized
  • Tags

    #digg #ITM #NoAgenda Binghamton clock microprocessor Nixie PCB PHP PODS Programing Rant Syndication twitter
  • Blogroll

    • The Flowing Candy Bees
    • XKCD – The Blag of the Webcomic
    • You Think this is a Game?
Copyright © 2010 Steven Viola Steven Viola
RSS Feeds XHTML 1.1 Top