Quantcast
Viewing all articles
Browse latest Browse all 295845

Deprecate PasswordInterface::check() in favour of ::verify()

Problem/Motivation

Split from #1845004: Replace custom password hashing library with PHP password_hash() (see comment #161).

After #1845004: Replace custom password hashing library with PHP password_hash(), only PasswordInterface::check() has a naming not aligned to PHP >=5.5.0 password hashing functions. The corresponding name should be ::verify() corresponding to PHP password_verify().

Proposed resolution

Because we want to keep BC...

  1. Add a new interface
    interface PasswordHashInterface extends PasswordInterface {
      public function verify($password, $hash);
    }
    
  2. Deprecate PasswordInterface::check()
  3. Use ::verify() everywhere in core instead of ::check()

A starting point is the interdiff.txt from #1845004-162: Replace custom password hashing library with PHP password_hash().

Remaining tasks

None.

User interface changes

None.

API changes

New interface

interface PasswordHashInterface extends PasswordInterface {
  public function verify($password, $hash);
}

Data model changes


Viewing all articles
Browse latest Browse all 295845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>