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


PHP UsernamePasswordToken::__construct方法代码示例

本文整理汇总了PHP中Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP UsernamePasswordToken::__construct方法的具体用法?PHP UsernamePasswordToken::__construct怎么用?PHP UsernamePasswordToken::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken的用法示例。


在下文中一共展示了UsernamePasswordToken::__construct方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct($sourceToken, Membership $membership, Project $project)
 {
     if (!$sourceToken instanceof UsernamePasswordToken && !$sourceToken instanceof RememberMeToken) {
         throw new AccessDeniedException('Invalid authentication token');
     }
     parent::__construct($sourceToken->getUser(), $sourceToken->getCredentials(), $sourceToken->getProviderKey(), $sourceToken->getUser()->getRoles());
     $this->membership = $membership;
     $this->masterProject = $project;
 }
开发者ID:zyxist,项目名称:cantiga,代码行数:9,代码来源:MembershipToken.php

示例2: __construct

 public function __construct(UserInterface $user, $originalTokenType, $credentials, $providerKey, array $roles = array())
 {
     parent::__construct($user, $credentials, $providerKey, $roles);
     $this->originalTokenType = $originalTokenType;
 }
开发者ID:Heyfara,项目名称:ezpublish-kernel,代码行数:5,代码来源:InteractiveLoginToken.php

示例3: __construct

 /**
  * Constructor.
  *
  * @param string|object            $user        The username (like a nickname, email address, etc.), or a UserInterface instance or an object implementing a __toString method.
  * @param string                   $sessionId   Session id
  * @param string                   $providerKey The provider key
  * @param RoleInterface[]|string[] $roles       An array of roles
  *
  * @throws \InvalidArgumentException
  */
 public function __construct($user, $sessionId, $providerKey, array $roles = array())
 {
     parent::__construct($user, $sessionId, $providerKey, $roles);
     $this->setAttribute("sessionId", $sessionId);
 }
开发者ID:athlan,项目名称:revive-symfony-security-bundle,代码行数:15,代码来源:ReviveAuthenticationToken.php

示例4: __construct

 /**
  * @param string       $user
  * @param string       $credentials
  * @param string       $providerKey
  * @param array        $roles
  * @param Organization $organizationContext
  */
 public function __construct($user, $credentials, $providerKey, Organization $organizationContext, array $roles = [])
 {
     $this->organizationContext = $organizationContext;
     parent::__construct($user, $credentials, $providerKey, $roles);
 }
开发者ID:ramunasd,项目名称:platform,代码行数:12,代码来源:UsernamePasswordOrganizationToken.php

示例5: __construct

 /**
  * Constructor.
  *
  * @param string|object            $user        The username (like a nickname, email address, etc.), or a UserInterface instance or an object implementing a __toString method.
  * @param string                   $credentials This usually is the password of the user
  * @param string                   $providerKey The provider key
  * @param RoleInterface[]|string[] $roles       An array of roles
  *
  * @throws \InvalidArgumentException
  */
 public function __construct($user, $credentials, $providerKey, array $roles = array(), $asn)
 {
     parent::__construct($user, $credentials, $providerKey, $roles);
     $this->asn = $asn;
 }
开发者ID:AlexEvesDeveloper,项目名称:hl-stuff,代码行数:15,代码来源:AsnUsernamePasswordToken.php

示例6: __construct

 /**
  * EmailToken constructor.
  * @param object|string $user
  * @param string $credentials
  * @param string $providerKey
  * @param array $roles
  */
 public function __construct($user, $credentials, $providerKey, array $roles = array())
 {
     parent::__construct($user, $credentials, $providerKey, $roles);
     $this->createdAt = time();
 }
开发者ID:NathanVss,项目名称:oauth-extension-bundle,代码行数:12,代码来源:EmailToken.php


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