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


PHP CFRuntime::session_based_auth方法代码示例

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


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

示例1: __construct

 /**
  * Constructs a new instance of <AmazonEC2>. If the <code>AWS_DEFAULT_CACHE_CONFIG</code> configuration
  * option is set, requests will be authenticated using a session token. Otherwise, requests will use
  * the older authentication method.
  *
  * @param string $key (Optional) Your AWS key, or a session key. If blank, it will look for the <code>AWS_KEY</code> constant.
  * @param string $secret_key (Optional) Your AWS secret key, or a session secret key. If blank, it will look for the <code>AWS_SECRET_KEY</code> constant.
  * @param string $token (optional) An AWS session token. If blank, a request will be made to the AWS Secure Token Service to fetch a set of session credentials.
  * @return boolean A value of <code>false</code> if no valid values are set, otherwise <code>true</code>.
  */
 public function __construct($key = null, $secret_key = null, $token = null)
 {
     $this->api_version = '2011-02-28';
     $this->hostname = self::DEFAULT_URL;
     if (!$key && !defined('AWS_KEY')) {
         // @codeCoverageIgnoreStart
         throw new EC2_Exception('No account key was passed into the constructor, nor was it set in the AWS_KEY constant.');
         // @codeCoverageIgnoreEnd
     }
     if (!$secret_key && !defined('AWS_SECRET_KEY')) {
         // @codeCoverageIgnoreStart
         throw new EC2_Exception('No account secret was passed into the constructor, nor was it set in the AWS_SECRET_KEY constant.');
         // @codeCoverageIgnoreEnd
     }
     if (defined('AWS_DEFAULT_CACHE_CONFIG') && AWS_DEFAULT_CACHE_CONFIG) {
         return parent::session_based_auth($key, $secret_key, $token);
     }
     return parent::__construct($key, $secret_key);
 }
开发者ID:ChrstnMgcn,项目名称:revolution,代码行数:29,代码来源:ec2.class.php

示例2: __construct

 /**
  * Constructs a new instance of <AmazonS3>. If the <code>AWS_DEFAULT_CACHE_CONFIG</code> configuration
  * option is set, requests will be authenticated using a session token. Otherwise, requests will use
  * the older authentication method.
  *
  * @param string $key (Optional) Your AWS key, or a session key. If blank, it will look for the <code>AWS_KEY</code> constant.
  * @param string $secret_key (Optional) Your AWS secret key, or a session secret key. If blank, it will look for the <code>AWS_SECRET_KEY</code> constant.
  * @param string $token (optional) An AWS session token. If blank, a request will be made to the AWS Secure Token Service to fetch a set of session credentials.
  * @return boolean A value of <code>false</code> if no valid values are set, otherwise <code>true</code>.
  */
 public function __construct($key = null, $secret_key = null, $token = null)
 {
     $this->vhost = null;
     $this->api_version = '2006-03-01';
     $this->hostname = self::DEFAULT_URL;
     $this->base_acp_xml = '<?xml version="1.0" encoding="UTF-8"?><AccessControlPolicy xmlns="http://s3.amazonaws.com/doc/latest/"></AccessControlPolicy>';
     $this->base_location_constraint = '<?xml version="1.0" encoding="UTF-8"?><CreateBucketConfiguration xmlns="http://s3.amazonaws.com/doc/' . $this->api_version . '/"><LocationConstraint></LocationConstraint></CreateBucketConfiguration>';
     $this->base_logging_xml = '<?xml version="1.0" encoding="utf-8"?><BucketLoggingStatus xmlns="http://doc.s3.amazonaws.com/' . $this->api_version . '"></BucketLoggingStatus>';
     $this->base_notification_xml = '<?xml version="1.0" encoding="utf-8"?><NotificationConfiguration></NotificationConfiguration>';
     $this->base_versioning_xml = '<?xml version="1.0" encoding="utf-8"?><VersioningConfiguration xmlns="http://s3.amazonaws.com/doc/' . $this->api_version . '/"></VersioningConfiguration>';
     $this->complete_mpu_xml = '<?xml version="1.0" encoding="utf-8"?><CompleteMultipartUpload></CompleteMultipartUpload>';
     $this->website_config_xml = '<?xml version="1.0" encoding="utf-8"?><WebsiteConfiguration xmlns="http://s3.amazonaws.com/doc/' . $this->api_version . '/"><IndexDocument><Suffix>index.html</Suffix></IndexDocument><ErrorDocument><Key>error.html</Key></ErrorDocument></WebsiteConfiguration>';
     if (!$key && !defined('AWS_KEY')) {
         // @codeCoverageIgnoreStart
         throw new S3_Exception('No account key was passed into the constructor, nor was it set in the AWS_KEY constant.');
         // @codeCoverageIgnoreEnd
     }
     if (!$secret_key && !defined('AWS_SECRET_KEY')) {
         // @codeCoverageIgnoreStart
         throw new S3_Exception('No account secret was passed into the constructor, nor was it set in the AWS_SECRET_KEY constant.');
         // @codeCoverageIgnoreEnd
     }
     if (defined('AWS_DEFAULT_CACHE_CONFIG') && AWS_DEFAULT_CACHE_CONFIG) {
         return parent::session_based_auth($key, $secret_key, $token);
     }
     return parent::__construct($key, $secret_key);
 }
开发者ID:jervy-ez,项目名称:magic-members-test,代码行数:37,代码来源:s3.class.php


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