The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Apache::Wyrd::Interfaces::GetUser - Get User data from Auth service/Auth Cookies

SYNOPSIS

[in a subclass of Apache::Wyrd::Handler]

    sub process {
      my ($self) =@_;
      $self->{init}->{user} = $self->user('BASENAME::User');
      return FORBIDDEN
        unless ($self->check_auth($self->{init}->{user}));
      return;
    }

DESCRIPTION

Provides a User method that will check both the Apache notes table and the available cookies for a User created by the Apache::Wyrd::Services::Auth module. This is needed by any handler which will need to be informed as to the findings of a stacked Apache::Wyrd::Services::Auth handler.

But this method is not limited only to stacked Auth handlers. When the AuthPath SetPerlVar directive of the Apache::Wyrd::Services::Auth module is beyond the scope of the area where the authorization was checked (in other words, the cookie is returned to areas of the site where authorization is not required), this interface is useful for finding what user is browsing the site.

The SYNOPSIS shows the typical use of this interface in a subclass of Apache::Wyrd::Handler.

METHODS

(format: (returns) name (arguments after self))

(Apache::Wyrd::User) user (scalar)

Given a User object classname (such as BASENAME::User), this method revives any User object found by an Auth handler and either placed into the Apache notes table of the current session or in a cookie provided by the browser.

(hashref) null_user_spec (scalar)

Because the Apache::Wyrd:Services::Auth framework requires that there must be a user object defined even when no user has logged in, this is a "hook" method for providing minimum initialization of the non-user user object. It is passed the class name of the type of user object being created. Return value is a hashref, defaulting to the empty hash. When there is no login, this method's return value will be passed directly to the new method of the user object as if it were a new login.

BUGS/CAVEATS/RESERVED METHODS

UNKNOWN

AUTHOR

Barry King <wyrd@nospam.wyrdwright.com>

SEE ALSO

Apache::Wyrd

General-purpose HTML-embeddable perl object

LICENSE

Copyright 2002-2007 Wyrdwright, Inc. and licensed under the GNU GPL.

See LICENSE under the documentation for Apache::Wyrd.