-
-
16 Dec 2008 18:54:00 UTC
- Distribution: Catalyst-Authentication-AuthTkt
- Module version: 0.08
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (0)
- Testers (77 / 0 / 0)
- Kwalitee
Bus factor: 0- License: unknown
- Activity
24 month- Tools
- Download (8.86KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 1 contributors- Peter Karman <karman at cpan dot org>
NAME
Catalyst::Authentication::AuthTkt - shim for Apache::AuthTkt
SYNOPSIS
# in your MyApp.pm file use Catalyst qw( Authentication ); # Configure an authentication realm in your app config: <authentication> default_realm authtkt auth_url http://yourdomain/login <realms> <authtkt> class AuthTkt <credential> class AuthTkt </credential> <store> class AuthTkt cookie_name auth_tkt # either the path to your Apache .conf file #conf path/to/httpd.conf # or set the secret string explicitly #secret fee fi fo fum # these next two are the Apache::AuthTkt defaults timeout 2h timeout_refresh 0.50 # explicitly define a domain for the cookie # NOTE the leading dot means every host in the subdomain domain .foo.bar.com # mock a user -- this effectively turns off # the auth system. *** for development only *** <mock> id joeuser tokens foo tokens bar </mock> </store> </authtkt> </realms> </authentication> # and then in your Root controller 'auto': sub auto : Private { my ( $self, $c ) = @_; # validate the ticket and update ticket and session if necessary return 1 if $c->authenticate; # no valid login found so redirect. $c->response->redirect( $c->config->{authentication_url} ); # tell Catalyst to abort processing. return 0; } # and then elsewhere in your app if ($c->user_exists) { $c->log->debug("Logged in as user " . $c->user->id); #... }
DESCRIPTION
This module implements the Catalyst::Authentication API for Apache::AuthTkt version 0.08 and later.
This module does not implement any features for creating the AuthTkt cookie. Instead, this module simply checks that the AuthTkt cookie is present and unpacks it in accordance with the Authentication API. The intention is that you create/set the AuthTkt cookie independently of the Authentication code, whether in a separate application (e.g. the mod_auth_tkt
login.cgi
script) or via the Apache::AuthTkt module directly.mod_auth_tkt http://www.openfusion.com.au/labs/mod_auth_tkt/ is a single-sign-on C module for Apache. Using this module, however, you could implement all the features of mod_auth_tkt, in Perl, using any web server where you can deploy Catalyst, including front-end-proxy/back-end-mod_perl and lighttpd situations.
AUTHOR
Peter Karman,
<karman at cpan dot org>
BUGS
Please report any bugs or feature requests to
bug-catalyst-authentication-authtkt at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Catalyst-Authentication-AuthTkt. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Catalyst::Authentication::AuthTkt
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
http://cpanratings.perl.org/d/Catalyst-Authentication-AuthTkt
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Catalyst-Authentication-AuthTkt
Search CPAN
ACKNOWLEDGEMENTS
The Minnesota Supercomputing Institute
http://www.msi.umn.edu/
sponsored the development of this software.COPYRIGHT & LICENSE
Copyright 2008 by the Regents of the University of Minnesota.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Module Install Instructions
To install Catalyst::Authentication::AuthTkt, copy and paste the appropriate command in to your terminal.
cpanm Catalyst::Authentication::AuthTkt
perl -MCPAN -e shell install Catalyst::Authentication::AuthTkt
For more information on module installation, please visit the detailed CPAN module installation guide.