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


PHP SimpleSAML_Auth_Source::__construct方法代码示例

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


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

示例1: __construct

 /**
  * Constructor for this authentication source.
  *
  * @param array $info Information about this authentication source.
  * @param array $config The configuration of the module
  *
  * @throws Exception If the KRB5 extension is not installed or active.
  */
 public function __construct($info, $config)
 {
     assert('is_array($info)');
     assert('is_array($config)');
     if (!extension_loaded('krb5')) {
         throw new Exception('KRB5 Extension not installed');
     }
     // call the parent constructor first, as required by the interface
     parent::__construct($info, $config);
     $config = SimpleSAML_Configuration::loadFromArray($config);
     $this->backend = $config->getString('fallback');
     $this->hostname = $config->getString('hostname');
     $this->port = $config->getInteger('port', 389);
     $this->referrals = $config->getBoolean('referrals', true);
     $this->enableTLS = $config->getBoolean('enable_tls', false);
     $this->debugLDAP = $config->getBoolean('debugLDAP', false);
     $this->timeout = $config->getInteger('timeout', 30);
     $this->keytab = $config->getString('keytab');
     $this->base = $config->getArrayizeString('base');
     $this->attr = $config->getString('attr', 'uid');
     $this->subnet = $config->getArray('subnet', null);
     $this->admin_user = $config->getString('adminUser', null);
     $this->admin_pw = $config->getString('adminPassword', null);
     $this->attributes = $config->getArray('attributes', null);
 }
开发者ID:Chialab,项目名称:simplesamlphp,代码行数:33,代码来源:Negotiate.php

示例2: __construct

 /**
  * Constructor for this authentication source.
  *
  * @param array $info  Information about this authentication source.
  * @param array $config  Configuration.
  */
 public function __construct($info, $config)
 {
     assert('is_array($info)');
     assert('is_array($config)');
     /* Call the parent constructor first, as required by the interface. */
     parent::__construct($info, $config);
     if (!array_key_exists('serverurl', $config)) {
         throw new Exception('aselect serverurl not specified');
     }
     $this->asconfig['serverurl'] = $config['serverurl'];
     if (!array_key_exists('serverid', $config)) {
         throw new Exception('aselect serverid not specified');
     }
     $this->asconfig['serverid'] = $config['serverid'];
     if (!array_key_exists('type', $config)) {
         throw new Exception('aselect type not specified');
     }
     $this->asconfig['type'] = $config['type'];
     if ($this->asconfig['type'] == 'app') {
         if (!array_key_exists('app_id', $config)) {
             throw new Exception('aselect app_id not specified');
         }
         $this->asconfig['app_id'] = $config['app_id'];
     } elseif ($this->asconfig['type'] == 'cross') {
         if (!array_key_exists('local_organization', $config)) {
             throw new Exception('aselect local_organization not specified');
         }
         $this->asconfig['local_organization'] = $config['local_organization'];
         $this->asconfig['required_level'] = array_key_exists('required_level', $config) ? $config['required_level'] : 10;
     } else {
         throw new Exception('aselect type need to be either app or cross');
     }
 }
开发者ID:filonuse,项目名称:fedlab,代码行数:39,代码来源:aselect.php

示例3: __construct

 public function __construct($info, $config)
 {
     assert('is_array($info)');
     assert('is_array($config)');
     /* Call the parent constructor first, as required by the interface. */
     parent::__construct($info, $config);
 }
开发者ID:Stony-Brook-University,项目名称:doitsbu,代码行数:7,代码来源:ICAuth.php

示例4: __construct

 /**
  * Constructor for this authentication source.
  *
  * @param array $info  Information about this authentication source.
  * @param array $config  Configuration.
  */
 public function __construct($info, $config)
 {
     assert('is_array($info)');
     assert('is_array($config)');
     /* Call the parent constructor first, as required by the interface. */
     parent::__construct($info, $config);
     if (!array_key_exists('cas', $config)) {
         throw new Exception('cas authentication source is not properly configured: missing [cas]');
     }
     if (!array_key_exists('ldap', $config)) {
         throw new Exception('ldap authentication source is not properly configured: missing [ldap]');
     }
     $this->_casConfig = $config['cas'];
     $this->_ldapConfig = $config['ldap'];
     if (isset($this->_casConfig['serviceValidate'])) {
         $this->_validationMethod = 'serviceValidate';
     } elseif (isset($this->_casConfig['validate'])) {
         $this->_validationMethod = 'validate';
     } else {
         throw new Exception("validate or serviceValidate not specified");
     }
     if (isset($this->_casConfig['login'])) {
         $this->_loginMethod = $this->_casConfig['login'];
     } else {
         throw new Exception("cas login url not specified");
     }
 }
开发者ID:filonuse,项目名称:fedlab,代码行数:33,代码来源:CAS.php

示例5: __construct

 /**
  * Constructor for Google authentication source.
  *
  * @param array $info Information about this authentication source.
  * @param array $config Configuration.
  */
 public function __construct($info, $config)
 {
     assert('is_array($info)');
     assert('is_array($config)');
     /* Call the parent constructor first, as required by the interface. */
     parent::__construct($info, $config);
     if (!array_key_exists('key', $config)) {
         throw new Exception('Google authentication source is not properly configured: missing [key]');
     }
     $this->key = $config['key'];
     if (!array_key_exists('secret', $config)) {
         throw new Exception('Google authentication source is not properly configured: missing [secret]');
     }
     $this->secret = $config['secret'];
     $this->linkback = SimpleSAML_Module::getModuleURL('authgoogleOIDC') . '/linkback.php';
     // Create Client
     $this->client = new Google_Client();
     $this->client->setApplicationName('Google gateway');
     $this->client->setClientId($this->key);
     $this->client->setClientSecret($this->secret);
     $this->client->setRedirectUri($this->linkback);
     $this->client->addScope('openid');
     $this->client->addScope('profile');
     $this->client->addScope('email');
 }
开发者ID:Baggerone,项目名称:simplesamlphp,代码行数:31,代码来源:GoogleOIDC.php

示例6: __construct

 /**
  * Constructor for this authentication source.
  *
  * @param array $info  Information about this authentication source.
  * @param array $config  Configuration.
  */
 public function __construct($info, $config)
 {
     assert('is_array($info)');
     assert('is_array($config)');
     // Call the parent constructor first, as required by the interface
     parent::__construct($info, $config);
     // Do any other configuration we need here
 }
开发者ID:PitcherAG,项目名称:simplesamlphp,代码行数:14,代码来源:External.php

示例7: __construct

 /**
  * Constructor for this authentication source.
  *
  * All subclasses who implement their own constructor must call this constructor before
  * using $config for anything.
  *
  * @param array $info  Information about this authentication source.
  * @param array &$config  Configuration for this authentication source.
  */
 public function __construct($info, &$config)
 {
     assert('is_array($info)');
     assert('is_array($config)');
     /* Call the parent constructor first, as required by the interface. */
     parent::__construct($info, $config);
     $this->usernameOrgMethod = 'none';
 }
开发者ID:ravi-sharma,项目名称:saml-sso-integration,代码行数:17,代码来源:UserPassOrgBase.php

示例8: __construct

 /**
  * Constructor for this authentication source.
  *
  * @param array $info  Information about this authentication source.
  * @param array $config  Configuration.
  */
 public function __construct($info, $config)
 {
     assert('is_array($info)');
     assert('is_array($config)');
     /* Call the parent constructor first, as required by the interface. */
     parent::__construct($info, $config);
     $this->userPassSource = $config['userPassSource'];
 }
开发者ID:RKathees,项目名称:is-connectors,代码行数:14,代码来源:TiqrUserPass.php

示例9: __construct

 /**
  * Constructor for this authentication source.
  *
  * All subclasses who implement their own constructor must call this constructor before
  * using $config for anything.
  *
  * @param array $info  Information about this authentication source.
  * @param array &$config  Configuration for this authentication source.
  */
 public function __construct($info, &$config)
 {
     assert('is_array($info)');
     assert('is_array($config)');
     if (isset($config['core:loginpage_links'])) {
         $this->loginLinks = $config['core:loginpage_links'];
     }
     /* Call the parent constructor first, as required by the interface. */
     parent::__construct($info, $config);
 }
开发者ID:filonuse,项目名称:fedlab,代码行数:19,代码来源:UserPassBase.php

示例10: __construct

 /**
  * Constructor for this authentication source.
  *
  * @param array $info  Information about this authentication source.
  * @param array $config  Configuration.
  */
 public function __construct($info, $config)
 {
     /* Call the parent constructor first, as required by the interface. */
     parent::__construct($info, $config);
     $this->clientId = $config['client_id'];
     $this->clientSecret = $config['client_secret'];
     $this->tokenEndpoint = $config['token_endpoint'];
     $this->userInfoEndpoint = $config['user_info_endpoint'];
     $this->authEndpoint = $config['auth_endpoint'];
     $this->sslcapath = $config['sslcapath'];
 }
开发者ID:bradjonesllc,项目名称:simplesamlphp-module-openidconnect,代码行数:17,代码来源:Connect.php

示例11: __construct

 /**
  * Constructor for this authentication source.
  *
  * @param array $info	 Information about this authentication source.
  * @param array $config	 Configuration.
  */
 public function __construct($info, $config)
 {
     assert('is_array($info)');
     assert('is_array($config)');
     /* Call the parent constructor first, as required by the interface. */
     parent::__construct($info, $config);
     if (!array_key_exists('sources', $config)) {
         throw new Exception('The required "sources" config option was not found');
     }
     $this->sources = $config['sources'];
 }
开发者ID:hukumonline,项目名称:yii,代码行数:17,代码来源:MultiAuth.php

示例12: __construct

 /**
  * Constructor for this authentication source.
  *
  * @param array $info  Information about this authentication source.
  * @param array $config  Configuration.
  */
 public function __construct($info, $config)
 {
     assert('is_array($info)');
     assert('is_array($config)');
     /* Call the parent constructor first, as required by the interface. */
     parent::__construct($info, $config);
     $configObject = SimpleSAML_Configuration::loadFromArray($config, 'authsources[' . var_export($this->authId, TRUE) . ']');
     $this->key = $configObject->getString('key');
     $this->secret = $configObject->getString('secret');
     $this->force_login = $configObject->getBoolean('force_login', FALSE);
 }
开发者ID:tractorcow,项目名称:simplesamlphp,代码行数:17,代码来源:Twitter.php

示例13: __construct

 /**
  * Constructor for this authentication source.
  *
  * @param array $info  Information about this authentication source.
  * @param array $config  Configuration.
  */
 public function __construct($info, $config)
 {
     assert('is_array($info)');
     assert('is_array($config)');
     /* Call the parent constructor first, as required by the interface. */
     parent::__construct($info, $config);
     $cfgParse = SimpleSAML_Configuration::loadFromArray($config, 'authsources[' . var_export($this->authId, TRUE) . ']');
     $this->api_key = $cfgParse->getString('api_key');
     $this->secret = $cfgParse->getString('secret');
     $this->req_perms = $cfgParse->getString('req_perms', NULL);
 }
开发者ID:emma5021,项目名称:toba,代码行数:17,代码来源:Facebook.php

示例14: __construct

 /**
  * Constructor for this authentication source.
  *
  * @param array $info   Information about this authentication source.
  * @param array $config Configuration.
  */
 public function __construct($info, $config)
 {
     assert('is_array($info)');
     assert('is_array($config)');
     /* Call the parent constructor first, as required by the interface. */
     parent::__construct($info, $config);
     if (!array_key_exists('uid', $config) || !is_string($config['uid'])) {
         throw new SimpleSAML_Error_Exception("AA configuration error, 'uid' not found or not a string.");
     }
     SimpleSAML_Logger::debug('[aa] auth source Bypass: config uid: ' . $config['uid']);
     $this->uid = $config['uid'];
 }
开发者ID:niif,项目名称:simplesamlphp-module-aa,代码行数:18,代码来源:Bypass.php

示例15: __construct

 /**
  * Constructor for this authentication source.
  *
  * @param array $info  Information about this authentication source.
  * @param array $config  Configuration.
  */
 public function __construct($info, $config)
 {
     /* Call the parent constructor first, as required by the interface. */
     parent::__construct($info, $config);
     $cfgParse = SimpleSAML_Configuration::loadFromArray($config, 'Authentication source ' . var_export($this->authId, TRUE));
     $this->target = $cfgParse->getString('target', NULL);
     $this->realm = $cfgParse->getString('realm', NULL);
     $this->optionalAttributes = $cfgParse->getArray('attributes.optional', array());
     $this->requiredAttributes = $cfgParse->getArray('attributes.required', array());
     $this->optionalAXAttributes = $cfgParse->getArray('attributes.ax_optional', array());
     $this->requiredAXAttributes = $cfgParse->getArray('attributes.ax_required', array());
     $this->validateSReg = $cfgParse->getBoolean('sreg.validate', TRUE);
 }
开发者ID:filonuse,项目名称:fedlab,代码行数:19,代码来源:OpenIDConsumer.php


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