当前位置: 首页>>代码示例>>PHP>>正文


PHP UserInterface::getSalt方法代码示例

本文整理汇总了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());
 }
开发者ID:vandpibe,项目名称:form,代码行数:12,代码来源:EncoderTransformer.php

示例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;
 }
开发者ID:eduardobenito10,项目名称:CorredoresRioja,代码行数:7,代码来源:CorredorUser.php

示例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;
 }
开发者ID:volodyawork,项目名称:twitter,代码行数:16,代码来源:RedisUser.php

示例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;
 }
开发者ID:gitter-badger,项目名称:OAuth2ServerBundle,代码行数:16,代码来源:EndUser.php

示例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;
 }
开发者ID:ArtesanIO,项目名称:ACLBundle,代码行数:16,代码来源:UsuariosService.php

示例6: getSalt

 public function getSalt()
 {
     return $this->user->getSalt();
 }
开发者ID:jpsymfony,项目名称:REST-BEHAT,代码行数:4,代码来源:ChangePassword.php

示例7: isEqualTo

 public function isEqualTo(UserInterface $user)
 {
     return $user instanceof User && $this->getUsername() === $user->getUsername() && $this->getPassword() === $user->getPassword() && $this->getSalt() === $user->getSalt();
 }
开发者ID:bebetojefry,项目名称:symfony-2,代码行数:4,代码来源:User.php

示例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;
     }
 }
开发者ID:mickaelsteinberg,项目名称:BackBee,代码行数:18,代码来源:UserAuthenticationProvider.php

示例9: getSalt

 /**
  * @param UserInterface $user
  * @return null|string
  */
 private function getSalt(UserInterface $user)
 {
     return $user->getSalt();
 }
开发者ID:gitter-badger,项目名称:diamantedesk-application,代码行数:8,代码来源:WsseProvider.php

示例10: getSalt

 protected function getSalt(UserInterface $user)
 {
     return $user->getSalt();
 }
开发者ID:aml-bendall,项目名称:ExpandAkeneoApi,代码行数:4,代码来源:Provider.php

示例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;
 }
开发者ID:baszoetekouw,项目名称:janus,代码行数:19,代码来源:User.php

示例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;
 }
开发者ID:pedrocasado,项目名称:symfony2-oauth-token-example,代码行数:16,代码来源:Estabelecimento.php

示例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;
 }
开发者ID:Aerendir,项目名称:LiipFunctionalTestBundle,代码行数:16,代码来源:User.php

示例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;
 }
开发者ID:hollodk,项目名称:clubmaster,代码行数:25,代码来源:User.php

示例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;
    }
开发者ID:ndusan,项目名称:tbq,代码行数:24,代码来源:User.php


注:本文中的Symfony\Component\Security\Core\User\UserInterface::getSalt方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。