當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。