Catalyst::Plugin::Authentication::Store::LDAP::User

Catalyst::Plugin::Authentication::Store::LDAP::User is a user object representing an LDAP object.
Download

Catalyst::Plugin::Authentication::Store::LDAP::User Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Adam Jacob
  • Publisher web site:
  • http://search.cpan.org/~holoway/Catalyst-Plugin-Authentication-Store-LDAP-0.04/lib/Catalyst/Plugin/Authentication/Store/LDAP.pm

Catalyst::Plugin::Authentication::Store::LDAP::User Tags


Catalyst::Plugin::Authentication::Store::LDAP::User Description

Catalyst::Plugin::Authentication::Store::LDAP::User is a user object representing an LDAP object. Catalyst::Plugin::Authentication::Store::LDAP::User is a user object representing an LDAP object.SYNOPSISYou should be creating these objects through Catalyst::Plugin::Authentication::Store::LDAP::Backend's "get_user" method, or just letting $c->login do it for you. sub action : Local { my ( $self, $c ) = @_; $c->login($c->req->param(username), $c->req->param(password)); $c->log->debug($c->user->username . "is really neat!"); }If you access just $c->user in a scalar context, it will return the current username.This wraps up an LDAP object and presents a simplified interface to it's contents. It uses some AUTOLOAD magic to pass method calls it doesn't understand through as simple read only accessors for the LDAP entries various attributes.It gets grumpy if you ask for an attribute via the AUTOLOAD mechanism that it doesn't know about. Avoid that with using "has_attribute", discussed in more detail below.You can skip all that and just go straight to the Net::LDAP::Entry object through the "ldap_entry" method: my $entry = $c->user->ldap_entry;It also has support for Roles.METHODSnew($store, $user)Takes a Catalyst::Plugin::Authentication::Store::LDAP::Backend object as $store, and the data structure returned by that class's "get_user" method as $user.Returns a Catalyst::Plugin::Authentication::Store::LDAP::User object.idReturns the results of the "stringify" method.stringifyUses the "user_field" configuration option to determine what the "username" of this object is, and returns it.If you use the special value "dn" for user_field, it will return the DN of the Net::LDAP::Entry object.check_password($password)Bind's to the directory as the DN of the internal Net::LDAP::Entry object, using the bind password supplied in $password. Returns 1 on a successful bind, 0 on failure.rolesReturns the results of Catalyst::Plugin::Authentication::Store::LDAP::Backend's "lookup_roles" method, an array of roles that are valid for this user.ldap_entryReturns the raw ldap_entry.attributes($type)Returns an array of attributes present for this user. If $type is "ashash", it will return a hash with the attribute names as keys. (And the values of those attributes as, well, the values of the hash)has_attributeReturns the values for an attribute, or undef if that attribute is not present. The safest way to get at an attribute. Requirements: · Perl


Catalyst::Plugin::Authentication::Store::LDAP::User Related Software