OpenInteract2::Auth

Base class for logging in OpenInteract users
Download

OpenInteract2::Auth Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Chris Winters
  • Publisher web site:
  • http://search.cpan.org/~cwinters/SPOPS-0.87/SPOPS/SQLInterface.pm

OpenInteract2::Auth Tags


OpenInteract2::Auth Description

Base class for logging in OpenInteract users OpenInteract2::Auth is a base Perl class for logging in OpenInteract users.SYNOPSIS # Set the classes responsible for the various auth pieces (in server # configuration, default is normally ok) auth_user_class = OpenInteract2::Auth::User auth_group_class = OpenInteract2::Auth::Group auth_admin_class = OpenInteract2::Auth::AdminCheck ... # Call from your adapter (most common): my $auth_info = OpenInteract2::Auth->new()->login(); # Hey, you picked up a user from somewhere (e.g., HTTP auth) my $auth_info = OpenInteract2::Auth->new({ user => $user }); $auth_info->login(); # Wow, a user AND groups? Okay, you're the boss... my $auth_info = OpenInteract2::Auth->new({ user => $user, groups => $groups }); $auth_info->login(); # Require that all users be logged into your site; users not logged # in always see /login.html unless they request one of the URL # patterns specified in 'required_skip' ... required = 0 required_url = /login.html required_skip = ^/$ required_skip = ^/index.html$ required_skip = ^/Login.* required_skip = ^/help.* # Define a custom handler to run with each login ... custom_login_handler = My::Auth::Class custom_login_method = loginParent class for OpenInteract2 authentication. Normally the adapter (the mod_perl content handler, CGI script, event handler, etc.) will just call 'login()' and let everything sort itself out.But if you're getting a user from somewhere else (HTTP authentication, out of a hat, etc.) then you can pass in a user and OI will gladly accept it, looking up the groups to which the user object belongs and making them available.The classes used by this class are all soft-settable via the server configuration. Check under the 'login' key for the various settings. This means you can implement your own user location methodology, or (perhaps more common) your own code to indicate whether a user is an administrator. Requirements: · Perl


OpenInteract2::Auth Related Software