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


PHP AbstractToken::__construct方法代码示例

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


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

示例1: __construct

 public function __construct($user, array $attributes = array(), array $roles = array())
 {
     parent::__construct($roles);
     $this->setUser($user);
     $this->casAttributes = $attributes;
     parent::setAuthenticated(true);
 }
开发者ID:rubenrua,项目名称:CasBundle,代码行数:7,代码来源:CasAuthenticationToken.php

示例2: __construct

 public function __construct($user, $attributes, array $roles = array())
 {
     parent::__construct($roles);
     $this->setUser($user);
     $this->setAttributes($attributes);
     $this->userIsNew = false;
 }
开发者ID:AlejandroHerr,项目名称:EsnGalaxy,代码行数:7,代码来源:CasToken.php

示例3: __construct

 /**
  * @param string
  * @param array $attributes
  * @param array $roles
  */
 public function __construct($providerKey, $identity, array $roles = array())
 {
     parent::__construct($roles);
     $this->setAuthenticated(count($this->getRoles()) > 0);
     $this->providerKey = $providerKey;
     $this->identity = $identity;
 }
开发者ID:migros,项目名称:FpOpenIdBundle,代码行数:12,代码来源:OpenIdToken.php

示例4: __construct

 public function __construct(array $roles = array())
 {
     parent::__construct($roles);
     // If the user has roles, consider it authenticated
     $this->setAuthenticated(count($roles) > 0);
     $this->setSessionToken();
 }
开发者ID:bose987,项目名称:symfony-angular,代码行数:7,代码来源:SecurityToken.php

示例5: __construct

 public function __construct(SteamAuthUser $user, $roles = array())
 {
     parent::__construct($roles);
     parent::setUser($user);
     // If the user has roles, consider it authenticated
     $this->setAuthenticated(count($roles) > 0);
 }
开发者ID:rafalniewinski,项目名称:silex-steamauth,代码行数:7,代码来源:SteamAuthToken.php

示例6: __construct

 /**
  * Constructor.
  *
  * @param string          $key   The key shared with the authentication provider
  * @param string          $user  The user
  * @param RoleInterface[] $roles An array of roles
  */
 public function __construct($key, $user, array $roles = array())
 {
     parent::__construct($roles);
     $this->key = $key;
     $this->setUser($user);
     $this->setAuthenticated(true);
 }
开发者ID:EnmanuelCode,项目名称:backend-laravel,代码行数:14,代码来源:AnonymousToken.php

示例7: __construct

 /**
  * Constructor.
  *
  * @param string          $secret A secret used to make sure the token is created by the app and not by a malicious client
  * @param string          $user   The user
  * @param RoleInterface[] $roles  An array of roles
  */
 public function __construct($secret, $user, array $roles = array())
 {
     parent::__construct($roles);
     $this->secret = $secret;
     $this->setUser($user);
     $this->setAuthenticated(true);
 }
开发者ID:Ener-Getick,项目名称:symfony,代码行数:14,代码来源:AnonymousToken.php

示例8: __construct

 public function __construct($providerKey, array $roles = array())
 {
     parent::__construct($roles);
     // If the user has roles, consider it authenticated
     $this->setAuthenticated(count($roles) > 0);
     $this->providerKey = $providerKey;
 }
开发者ID:iambrosi,项目名称:SamlSPBundle,代码行数:7,代码来源:SamlSpToken.php

示例9: __construct

 public function __construct(array $roles = array())
 {
     parent::__construct($roles);
     // If the user has roles, consider it authenticated
     $this->setAuthenticated(count($roles) > 0);
     $this->workspaceName = '';
 }
开发者ID:ngydat,项目名称:CoreBundle,代码行数:7,代码来源:ViewAsToken.php

示例10: __construct

 /**
  * @param string|object            $user         The username (like a nickname, email address, etc.),
  *                                               or a UserInterface instance
  *                                               or an object implementing a __toString method.
  * @param Organization             $organization The organization
  * @param RoleInterface[]|string[] $roles        An array of roles
  */
 public function __construct($user, Organization $organization, array $roles = [])
 {
     parent::__construct($roles);
     $this->setUser($user);
     $this->setOrganizationContext($organization);
     parent::setAuthenticated(count($roles) > 0);
 }
开发者ID:Maksold,项目名称:platform,代码行数:14,代码来源:ImpersonationToken.php

示例11: __construct

 public function __construct(OpauthResult $result, array $roles = array())
 {
     parent::__construct($roles);
     // If the user has roles, consider it authenticated
     $this->setAuthenticated(count($roles) > 0);
     $this->setAttribute('opauth', $result);
 }
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:7,代码来源:OpauthToken.php

示例12: __construct

 public function __construct($roles = array(), TokenResponseInterface $response)
 {
     parent::__construct($roles);
     $this->response = $response;
     $this->setAttribute('access_token', $response->getAccessToken());
     $this->setAttribute('via', $response->getProviderKey());
     $this->setAttribute('data', $response->getJson());
 }
开发者ID:nucleartux,项目名称:OAuthBundle,代码行数:8,代码来源:OAuthToken.php

示例13: __construct

 public function __construct($firewallName, $providerKey, $uid, array $role = [])
 {
     parent::__construct($role);
     $this->setAuthenticated(count($role) > 0);
     $this->setAttribute(self::UNIQUE_ID_ATTR, $uid);
     $this->setAttribute(self::PROVIDER_KEY_ATTR, $providerKey);
     $this->setAttribute(self::FIREWALL_NAME_ATTR, $firewallName);
 }
开发者ID:trismegiste,项目名称:oauthbundle,代码行数:8,代码来源:Token.php

示例14: __construct

 /**
  * Constructor.
  *
  * @param string|object            $user        The user
  * @param mixed                    $context The user credentials
  * @param string                   $providerKey The provider key
  * @param RoleInterface[]|string[] $roles       An array of roles
  */
 public function __construct($user, $context, $providerKey, array $roles = array())
 {
     parent::__construct($roles);
     $this->setUser($user);
     $this->credentials = $context;
     $this->providerKey = $providerKey;
     parent::setAuthenticated(count($roles) > 0);
 }
开发者ID:shirone,项目名称:security-jwt-service-provider,代码行数:16,代码来源:JWTToken.php

示例15: __construct

 public function __construct($usuario, $credenciales, array $roles = array())
 {
     parent::__construct($roles);
     // If the user has roles, consider it authenticated
     $this->setAuthenticated(count($roles) > 0);
     $this->credentials = $credenciales;
     $this->user = $usuario;
 }
开发者ID:vtacius,项目名称:ldapas,代码行数:8,代码来源:ldapUserToken.php


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