Catalyst Integration: Day 4

After a lot of cursing, tinkering, fixing, breaking, fixing, breaking and fixing, I've finally got most of the Auth/User bits converted to the new Catalyst Authentication API. when it's working, it means that people can reference common user elements for both authenticated and anonymous users in the same way:

## current users cart pre/post authenticate()
$c->user->cart;

## 'anonymous' before authenticate()
$c->user->username;

## 'Anonymous' before authenticate()
$c->user->profile->first_name;

## 'claco' after authenticate()
$c->authenticate(...);
$c->user->username;

## 'Christopher' after authenticate()
$c->user->profile->first_name;

In addition to a common way to reference user information, the Mango store also takes care of caching that user information, including roles, in session after authentication so we're no hitting the database every time we check roles, display profile information, etc.

The one thing I seem to be constantly fighting is that either Catalyst, or Authentication bits just eat errors in certain situations. Things like misnamed classes, classes not loading due to syntax errors, errors down in DBI just go into the ether. I'd say it's some SIG{DIE}/Error/Exception stuff somewhere just being too greedy. I don't think I'm alone either.

Categories

Leave a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

February 2008

Sun Mon Tue Wed Thu Fri Sat
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29  

Planet Catalyst News

About this Entry

This page contains a single entry by Christopher H. Laco published on April 28, 2007 7:20 PM.

Catalyst Integration: Day 1 was the previous entry in this blog.

Catalyst Integration: Day 26 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 4.1