Core\Encoder\UserPasswordEncoderInterface (Component\Security)

Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface

interface UserPasswordEncoderInterface

UserPasswordEncoderInterface is the interface for the password encoder service.

Methods

string encodePassword(UserInterface $user, string $plainPassword)

Encodes the plain password.

bool isPasswordValid(UserInterface $user, string $raw)

Details

public string encodePassword(UserInterface $user, string $plainPassword)

Encodes the plain password.

Parameters

UserInterface $user The user
string $plainPassword The password to encode

Return Value

string The encoded password

public bool isPasswordValid(UserInterface $user, string $raw)

Parameters

UserInterface $user The user
string $raw A raw password

Return Value

bool true if the password is valid, false otherwise
在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部