Help for this page

Select Code to Download


  1. or download this
     
               $pbk_crypt = Crypt::PBKDF2->new(
                    hash_class => 'HMACSHA2',
    ...
    
            $pass = $pbk_crypt->generate('password');
    
  2. or download this
    __PACKAGE__->config(
        'Plugin::Authentication' => {
    ...
                password_type   => 'self_check',
            },
    )
    
  3. or download this
    __PACKAGE__->add_columns(
        'password' => {
    ...
            passphrase_check_method => 'check_password',
        },
    );
    
  4. or download this
     if ($username and $password) {
        if ($c->authenticate({ username => $username,
    ...
                $c->stash(error_msg => "Bad username or password.");
            }
    }