Skip to content

Commit

Permalink
Declare exceptions that are already thrown by implementations
Browse files Browse the repository at this point in the history
  • Loading branch information
umulmrum committed Jan 4, 2019
1 parent a1c8da0 commit f4cc30b
Showing 1 changed file with 7 additions and 0 deletions.
Expand Up @@ -11,6 +11,8 @@

namespace Symfony\Component\Security\Core\Encoder;

use Symfony\Component\Security\Core\Exception\BadCredentialsException;

/**
* PasswordEncoderInterface is the interface for all encoders.
*
Expand All @@ -25,6 +27,9 @@ interface PasswordEncoderInterface
* @param string $salt The salt
*
* @return string The encoded password
*
* @throws BadCredentialsException If the raw password is invalid, e.g. excessively long
* @throws \InvalidArgumentException If the salt is invalid
*/
public function encodePassword($raw, $salt);

Expand All @@ -36,6 +41,8 @@ public function encodePassword($raw, $salt);
* @param string $salt The salt
*
* @return bool true if the password is valid, false otherwise
*
* @throws \InvalidArgumentException If the salt is invalid
*/
public function isPasswordValid($encoded, $raw, $salt);
}

0 comments on commit f4cc30b

Please sign in to comment.