Mailing List Archive

RFC for Facebook Credential
I'm writing a Facebook credential, and have encountered a bit of a
snag and looking for feedback on the best (or at least, most
appropriate way) of solving it.

The workflow in this case is:

1) User clicks "Login via Facebook"
2) User is taken to Facebook to provide username/password
3) User is redirected back to Catalyst application

The major difference between this workflow and OpenID, is the Facebook
step that the user has to "accept" the application. At this point,
Facebook sends a POST request back to the authenticating application.

So, the request cycle is coming from two sources, where Facebook
provides the user information. The only way to preserve this
information in step #3 is to cache the POST that Facebook sends in
step #2.

There is an auth_token on step #3, so it's trivial to implement the
cache cycle (step 2 stores $c->cache->{$auth_token} = $response, step
3 does my $user = $c->cache->{$auth_token})

But... it seems that requiring Cache to be loaded is less than ideal,
but I just can't think of any other way to do this.

(Also, there are other ways to authenticate via Facebook, and if
you're writing a Facebook -app- this isn't particularly necessary
since Facebook acts as a proxy. I'm not addressing those other cases,
only this one specifically)

Thanks,
-J

_______________________________________________
Catalyst-dev mailing list
Catalyst-dev@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev
Re: RFC for Facebook Credential [ In reply to ]
On 6 Oct 2008, at 21:12, J. Shirley wrote:
> But... it seems that requiring Cache to be loaded is less than ideal,
> but I just can't think of any other way to do this.

This is exactly the approach taken by
Authentication::Credential::HTTP to store the nonce for digest auth..

Cheers
t0m


_______________________________________________
Catalyst-dev mailing list
Catalyst-dev@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev