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

NAME

Egg::Model::Auth::API::File - API component to treat attestation data of file base.

SYNOPSIS

  package MyApp::Model::Auth::MyAuth;
  ..........
  
  __PACKAGE__->config(
    file => {
      path           => MyApp->path_to(qw/ etc members /),
      delimiter      => qr{\s*\:\s*},
      fields         => [qw/ user_id password active a_group ..... /],
      id_field       => 'user_id',
      password_field => 'password',
      active_field   => 'active',
      group_field    => 'a_group',
      },
    );
  
  __PACKAGE__->setup_api('File');

DESCRIPTION

It is API component to treat the attestation data of the file base of Comma Separated Value etc.

The setting of 'file' is added to the configuration to use it and 'File' is set by 'setup_api' method.

CONFIGURATION

Additionally, there is a common configuration to API class.

see Egg::Model::Auth::Base::API.

path

It is passing of the data file.

delimiter

The delimiter to take out the column of each record is set by the regular expression.

Default is '\s*\t\s*'.

fields

After the column is taken out, the name of the key to take the data into HASH is set by the list.

METHODS

myname

Own API label name is returned.

restore_member ([LOGIN_ID])

The data of LOGIN_ID is acquired from the attestation data base, and the HASH reference is returned.

SEE ALSO

Egg::Release, Egg::Model::Auth, Egg::Model::Auth::Base::API, FileHandle,

AUTHOR

Masatoshi Mizuno <lushe@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2008 Bee Flag, Corp. <http://egg.bomcity.com/>.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.