 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Lullabot.com: Single Sign-on across Sub-Domains in Drupal with No Extra Modules
by Chris Cornutt March 03, 2010 @ 11:06:57
On the Lullabot.com blog there's a recent post from Nate Haug showing how you can set up a single sign on with Drupal even if your user crosses multiple sub-domains on your site. The technique is particularly handy in that it doesn't require any extra modules to be installed to make it work.
With the multitude of single sign-on modules out there for Drupal, it's easy to miss the fact that Drupal has a built-in single sign on mechanism already. No modules, no configuration, just 20 easy lines of PHP in your site's settings.php file. This solution works for a lot of clients, but the set of requirements is pretty specific as to when you can use this approach.
To make it work all sites must be on the same domain (just sub-domains of it), be using MySQL as your backend database and, if you're using clustered hardware, they need to be on the same cluster to be able to make the cross-database queries. Since Drupal can prefix tables so the settings for each site are split out, you can create a "shared table" by making a few changes in your master and slave configuration.
voice your opinion now!
single signon drupal tutorial mysql authentication
Arnold Daniels' Blog: Simple Single Sign-On for PHP
by Chris Cornutt April 20, 2009 @ 09:36:35
Arnold Daniels has a new post to his blog today dealing with something (usually companies) are looking towards to help deal with the infamous "too many passwords for too many places" issue - a simple single sign-on tool that can be dropped in an used anywhere.
Associated websites often share user information, so a visitor only has to register once and can use that username and password for all sites. A good example for this is Google. [...] There are many single sign-on applications and protocols. Most of these are fairly complex. [...] I've written a simple single sign-on solution (400 lines of code), which works by linking sessions. This solutions works for normal websites as well as AJAX sites.
He compares the flow on a non-single sign-on site (lots of fetching between the client/server) and the first/following visits with his tool in place. You can download the source here (as well as the Ajax broker).
voice your opinion now!
ajax broker library tool signon single simple
DevShed: Working with Strings and the Composite Pattern in PHP 5
by Chris Cornutt March 14, 2007 @ 11:14:00
DevShed has posted the second and last part of a series of two articles based around the Composite design pattern - using it to work with strings in PHP5.
Are you a PHP developer who wants to improve your skills in pattern-based programming in PHP? If the answer to this question is a emphatic yes, then you should begin reading this article now! Welcome to the final part of the series "Implementing the composite pattern with PHP 5." Comprised of two instructive tutorials, this series walks you through the basic concepts of this important design pattern, and shows you how to apply it with some educational examples.
They start by defining a simple StringProcessor class as an abstract interface to build from. From there, they create two other classes - the SingleStringProcessor and the MultipleStringProcessor. Each of these takes in either a single file or multiple filenames and spits back out the value of the string and the length of the string.
voice your opinion now!
tutorial composite designpattern strings single multiple tutorial composite designpattern strings single multiple
DevShed: Introducing the Composite Pattern in PHP 5
by Chris Cornutt March 09, 2007 @ 09:33:00
Continuing their look at design patterns, DevShed has kicked off yet another series today spotlighting the Composite pattern as used in PHP5.
The composite pattern is one of the less commonly used patterns in PHP 5. Nevertheless, in certain situations, it is very helpful. This article, the first one in a two-part series, will introduce you to the basic concepts of the composite pattern.
The composite pattern allows you to define a single or multiple objects that will have identical behavior - basically behaving the same if there's just one or with the multiple instances. They start with the basics, reaching for one of their standard examples - a file information reader - to illustrate their point. They create the two helper classes it needs to work, one for the single file read and another for the multiple file read. The finish by combining them all together for a file-reading fiesta, showing how to get a one shot info dose as well adding files to the list and grabbing their info all together.
voice your opinion now!
introduction tutorial php5 designpattern composite object single multiple introduction tutorial php5 designpattern composite object single multiple
Vidyut Luther's Blog: Where do you "define" your environment/global settings?
by Chris Cornutt January 20, 2006 @ 06:44:36
From Vidyut Luther today, there's this new post that asks the question "Where do you 'define' your environment/global settings?"
I was wondering how people handled this situation themselves. I'm personally trying to decide whether my constants be in the class files, or a global configuration file. Right now I have a global.conf.php which contains things like (MySQL login info, include paths, table names).
So, my question is: Is it better to have one big configuration file, or should some things be defined on top of the individual classes ? (CONTACTS_TABLE.. is a clear example). I see pros and cons for both approaches.
He lists out pros and cons for the "one file approach" versus the "multiple specific definitions" method, for example:
- simple editing vs. easier to manage
- a single large file vs. multiple small files
- high memory usage on every page vs. lower memory consumption from loading only what's needed
voice your opinion now!
define global settings multiple file single large small define global settings multiple file single large small
|
Community Events
Don't see your event here? Let us know!
|