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