本文整理汇总了PHP中Symfony\Component\Security\Core\User\UserInterface::getSalt方法的典型用法代码示例。如果您正苦于以下问题:PHP UserInterface::getSalt方法的具体用法?PHP UserInterface::getSalt怎么用?PHP UserInterface::getSalt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Symfony\Component\Security\Core\User\UserInterface
的用法示例。
在下文中一共展示了UserInterface::getSalt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: reverseTransform
/**
* @{inheritdoc}
*/
public function reverseTransform($value)
{
// Only encode if $value holds something, empty means we shouldnt encode
// anything at all.
if (empty($value)) {
return $value;
}
return $this->factory->getEncoder($this->user)->encodePassword($value, $this->user->getSalt());
}
示例2: isEqualTo
public function isEqualTo(UserInterface $user)
{
if (!$user instanceof CorredorUser || $this->password !== $user->getPassword() || $this->salt !== $user->getSalt() || $this->username !== $user->getUsername()) {
return false;
}
return true;
}
示例3: isEqualTo
public function isEqualTo(UserInterface $user)
{
if (!$user instanceof RedisUser) {
return false;
}
if ($this->password !== $user->getPassword()) {
return false;
}
if ($this->salt !== $user->getSalt()) {
return false;
}
if ($this->email !== $user->getUsername()) {
return false;
}
return true;
}
示例4: equals
public function equals(UserInterface $user)
{
if (!$user instanceof self) {
return false;
}
if ($this->password !== $user->getPassword()) {
return false;
}
if ($this->getSalt() !== $user->getSalt()) {
return false;
}
if ($this->username !== $user->getUsername()) {
return false;
}
return true;
}
示例5: isEqualTo
public function isEqualTo(UserInterface $user)
{
if (!$user instanceof UsuariosService) {
return false;
}
if ($this->password !== $user->getPassword()) {
return false;
}
if ($this->salt !== $user->getSalt()) {
return false;
}
if ($this->username !== $user->getUsername()) {
return false;
}
return true;
}
示例6: getSalt
public function getSalt()
{
return $this->user->getSalt();
}
示例7: isEqualTo
public function isEqualTo(UserInterface $user)
{
return $user instanceof User && $this->getUsername() === $user->getUsername() && $this->getPassword() === $user->getPassword() && $this->getSalt() === $user->getSalt();
}
示例8: authenticateWithoutEncoder
/**
* Authenticate a token according to the user provided without any password encoders.
*
* @param \Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token
* @param \Symfony\Component\Security\Core\User\UserInterface $user
*
* @return boolean|\BackBee\Security\Token\UsernamePasswordToken
*/
private function authenticateWithoutEncoder(TokenInterface $token, UserInterface $user)
{
if (null !== $user->getSalt() && call_user_func($user->getSalt(), $token->getCredentials()) === $user->getPassword()) {
return new UsernamePasswordToken($user, $user->getPassword(), $user->getRoles());
} elseif ($token->getCredentials() === $user->getPassword()) {
return new UsernamePasswordToken($user, $user->getPassword(), $user->getRoles());
} else {
return false;
}
}
示例9: getSalt
/**
* @param UserInterface $user
* @return null|string
*/
private function getSalt(UserInterface $user)
{
return $user->getSalt();
}
示例10: getSalt
protected function getSalt(UserInterface $user)
{
return $user->getSalt();
}
示例11: isEqualTo
/**
* @inheritDoc
*/
public function isEqualTo(UserInterface $user)
{
if (!$user instanceof WebserviceUser) {
return false;
}
if ($this->getPassword() !== $user->getPassword()) {
return false;
}
if ($this->getSalt() !== $user->getSalt()) {
return false;
}
if ($this->getUsername() !== $user->getUsername()) {
return false;
}
return true;
}
示例12: isEqualTo
public function isEqualTo(UserInterface $user)
{
if (!$user instanceof Estabelecimento) {
return false;
}
if ($this->password !== $user->getPassword()) {
return false;
}
if ($this->salt !== $user->getSalt()) {
return false;
}
// if ($this->username !== $user->getUsername()) {
// return false;
// }
return true;
}
示例13: isEqualTo
public function isEqualTo(UserInterface $user)
{
if (!$user instanceof self) {
return false;
}
if ($this->id !== $user->getId()) {
return false;
}
if ($this->password !== $user->getPassword()) {
return false;
}
if ($this->salt !== $user->getSalt()) {
return false;
}
return true;
}
示例14: equals
public function equals(UserInterface $user)
{
if (!$user instanceof User) {
return false;
}
if ($this->password !== $user->getPassword()) {
return false;
}
if ($this->getSalt() !== $user->getSalt()) {
return false;
}
if ($this->isAccountNonExpired() !== $user->isAccountNonExpired()) {
return false;
}
if (!$this->locked !== $user->isAccountNonLocked()) {
return false;
}
if ($this->isCredentialsNonExpired() !== $user->isCredentialsNonExpired()) {
return false;
}
if ($this->enabled !== $user->isEnabled()) {
return false;
}
return true;
}
示例15: equals
/**
* @param UserInterface $user
* @return Boolean
*/
function equals(UserInterface $user)
{
if (!$user instanceof User) {
return false;
}
if ($this->email !== $user->getEmail()) {
return false;
}
if ($this->password !== $user->getPassword()) {
return false;
}
if ($this->getSalt() !== $user->getSalt()) {
return false;
}
return true;
}