You should think about your requirements, choose the appropriate protocol and some decent part of the software that implements it.
It is hard to say more without additional information:
- Are you talking about authentication for one or more web applications? Do you need a single sign between different web applications?
- all user data must be stored on your server or the user must log in, for example. with google account?
- should the token contain user information?
- What platform are your applications developed on?
- What authentication method should be used?
- Do you want to implement a portal?
There is a very wide range of protocols and tools that may or may not meet your requirements:
http://en.wikipedia.org/wiki/Category:Authentication_methods
http://en.wikipedia.org/wiki/Category:Identity_management_systems
I personally like CAS ( http://www.jasig.org/cas ) for single sign-on for tokens between multiple web applications. It is based on Java, but also has some support for PHP and .Net.
OpenID is fine if you want to allow users to log in with their Google, Yahoo, any account (custom ...) and donβt want to store information about themselves on their own.
Kerberos / SPNEGO is the way to go if you want to integrate windows-sso for enterprise intranet applications.
For university applications, SAML / Shibboleth is probably best. Outside of universities, he is somewhat less popular, probably giving him a rather complicated protocol.
Oh, and I almost forgot: most web frameworks / standards have their own version of plain old forms-based authentication. When the user goes to the login form, he enters his username and password. Both with or without SSL are transmitted to the web application server. The server checks it for the presence of any database and gives the user a cookie, which is transmitted and checked every time the user sends a request. But besides all these brilliant protocols, it looks pretty boring :-)
And before you do anything with web authentication, you can think about web security in general ( http://journal.paul.querna.org/articles/2010/04/11/internet-security-is-a- failure / http://www.eff.org/files/DefconSSLiverse.pdf ) and what you can do to not make it worse on your site ( http://www.codinghorror.com/blog/2008/08/ protecting-your-cookies-httponly.html http://owasptop10.googlecode.com/files/OWASP%20Top%2010%20-%202010.pdf ).