Anton Belousov > Eidolon-Driver-User-Basic-0.02 > Eidolon::Driver::User::Basic

Download:
Eidolon-Driver-User-Basic-0.02.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.02   Source  

NAME ^

Eidolon::Driver::User::Basic - Eidolon basic user driver.

SYNOPSIS ^

Login handler:

    my ($r, $user, $login, $pass);

    $r     = Eidolon::Core::Registry->get_instance;
    $user  = $r->loader->get_object("Eidolon::Driver::User::Basic");
    
    if (!$user->authorized)
    {
        $login = $r->cgi->post("login");
        $pass  = $r->cgi->post("password");

        # login & password validation
        # ...

        $user->authorize($login) if ($login_and_password_are_valid);
    }

Logout handler:

    my ($r, $user);

    $r    = Eidolon::Core::Registry->get_instance;
    $user = $r->loader->get_object("Eidolon::Driver::User::Basic");

    $user->unauthorize;

DESCRIPTION ^

The Eidolon::Driver::User::Basic is a user driver for Eidolon, that provides simple session-based authorization.

METHODS ^

new()

Inherited from "new()" in Eidolon::Driver::User.

authorize($login)

Implementation of abstract method from "authorize($login)" in Eidolon::Driver::User.

unauthorize()

Implementation of abstract method from "unauthorize()" in Eidolon::Driver::User.

authorized()

Implementation of abstract method from "authorized()" in Eidolon::Driver::User.

ATTRIBUTES ^

The Eidolon::Driver::User::Basic package adds one useful class attribute that is filled in during user authorization. See "ATTRIBUTES" in Eidolon::Driver::User for more information about using user driver class attributes.

agent

Inherited from "agent" in Eidolon::Driver::User.

ip

Inherited from "ip" in Eidolon::Driver::User.

language

Inherited from "language" in Eidolon::Driver::User.

referer

Inherited from "referer" in Eidolon::Driver::User.

login

User login. Contains information only if user was authorized before, undef otherwise.

SEE ALSO ^

Eidolon, Eidolon::Driver::User

LICENSE ^

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR ^

Anton Belousov, <abel@cpan.org>

COPYRIGHT ^

Copyright (c) 2009, Atma 7, http://www.atma7.com

syntax highlighting: