Help for this page

Select Code to Download


  1. or download this
    MT::Author
    
    ...
    I<set_password>). This check is done by one-way encrypting I<$check_pa
    +ss>,
    using the same salt used to encrypt the original password, then compar
    +ing the
    two encrypted strings for equality.
    
  2. or download this
    MT::Auth
    
    ...
    is a reference to a scalar variable for storing any error message to
    be returned to the application. The routine itself should return 1 for
    a valid password, 0 or undef for an invalid one.
    
  3. or download this
    sub set_password {
        my $auth = shift;
    ...
        # FIXME: use something besides 'crypt'
        $auth->column('password', crypt $pass, $salt);
    }
    
  4. or download this
    sub is_valid_password {
        my $author = shift;
    ...
        require MT::Auth;
        return MT::Auth->is_valid_password($author, $pass, $crypted, $erro
    +r_ref);
    }
    
  5. or download this
    BEGIN {
        my @methods = qw(
    ...
            *{"MT::Auth::$meth"} = sub { shift; _handle($meth, @_) };
        }
    }
    
  6. or download this
    {
    my $auth_module;
    ...
        undef $auth_module;
    }
    }
    
  7. or download this
    sub is_valid_password {
        my $auth = shift;
    ...
        return $crypted ? $real_pass eq $pass :
                          crypt($pass, $real_pass) eq $real_pass;
    }