Egg::Model::Auth::Base::API - Base class for API module of Egg::Model::Auth.


Egg-Release-Authorize documentation  | view source Contained in the Egg-Release-Authorize distribution.

Index


NAME

Top

Egg::Model::Auth::Base::API - Base class for API module of Egg::Model::Auth.

DESCRIPTION

Top

It is a base class to succeed to from API class dynamically generated with the AUTH controller.

see Egg::Model::Auth::API::DBI, Egg::Model::Auth::API::DBIC, Egg::Model::Auth::API::File,

CONFIGURATION

Top

各APIクラス用コンフィグレーションで共通の項目です。

METHODS

Top

new

Constructor.

  my $auth= $e->model('auth_label_name');
  my $api = $auth->api('File');

valid_id ([INPUT_ID])

The format of INPUT_ID is checked.

The format can be defined by setting the regular expression to 'user_id_regexp' of the configuration for each API.

Default is '[A-Za-z0-9\_\-]{4,16}'.

valid_pasword ([INPUT_PASSWORD])

The format of INPUT_PASSWORD is checked.

The format can be defined by setting the regular expression to 'password_regexp' of the configuration for each API.

Default is '[\x00-\x7F]{4,16}'.

password_check ([REGIST_PASSWORD], [INPUT_PASSWORD])

If REGIST_PASSWORD is corresponding to INPUT_PASSWORD, effective is returned.

  if ($api->password_check($reg_psw, $in_psw)) {
     .........
  } else {
     .........
  }

It is not possible to correspond by this method when encrypted for the registered password. Please set up the component of the Crypt system to API class.

  package MyApp::Model::Auth::MyAuth;
  ...........
  ....

  __PACKAGE__->setup_api( File=> qw/ Crypt::SHA1 / );

see Egg::Model::Auth::Crypt::SHA1, Egg::Model::Auth::Crypt::MD5, Egg::Model::Auth::Crypt::Func, Egg::Model::Auth::Crypt::CBC,

SEE ALSO

Top

Egg::Release, Egg::Model::Auth, Egg::Model::Auth::Base, Egg::Base, Egg::Component,

AUTHOR

Top

Masatoshi Mizuno <lushe&64;cpan.org>

COPYRIGHT AND LICENSE

Top


Egg-Release-Authorize documentation  | view source Contained in the Egg-Release-Authorize distribution.