| 1 |
lars |
1 |
<?php if (!class_exists('CFRuntime')) die('No direct access allowed.');
|
|
|
2 |
/**
|
|
|
3 |
* Stores your AWS account information. Add your account information, and then rename this file
|
|
|
4 |
* to 'config.inc.php'.
|
|
|
5 |
*
|
|
|
6 |
* @version 2011.12.14
|
|
|
7 |
* @license See the included NOTICE.md file for more information.
|
|
|
8 |
* @copyright See the included NOTICE.md file for more information.
|
|
|
9 |
* @link http://aws.amazon.com/php/ PHP Developer Center
|
|
|
10 |
* @link http://aws.amazon.com/security-credentials AWS Security Credentials
|
|
|
11 |
*/
|
|
|
12 |
|
|
|
13 |
|
|
|
14 |
/*###################################################################################################
|
|
|
15 |
|
|
|
16 |
As of version 1.5, the AWS SDK for PHP uses the CFCredentials class to handle credentials.
|
|
|
17 |
This class has the advantage of being able to support multiple sets of credentials at a time,
|
|
|
18 |
including the ability for credential sets to inherit settings from other credential sets.
|
|
|
19 |
|
|
|
20 |
Some example uses are noted at https://gist.github.com/1478912
|
|
|
21 |
|
|
|
22 |
Notes:
|
|
|
23 |
|
|
|
24 |
* You can define one or more credential sets.
|
|
|
25 |
|
|
|
26 |
* Credential sets can be named anything that PHP allows for an associative array key;
|
|
|
27 |
"production", "staging", etc., are just sample values. Feel free to rename them.
|
|
|
28 |
|
|
|
29 |
* A credential set only has four required entries: key, secret, default_cache_config and
|
|
|
30 |
certificate_authority. Aside from these, you can add any additional bits of information
|
|
|
31 |
you'd like to keep easily accessible (e.g., multi-factor authentication device key, your
|
|
|
32 |
AWS Account ID, your canonical identifiers).
|
|
|
33 |
|
|
|
34 |
* Additional credential sets can inherit the properties of another credential set using the
|
|
|
35 |
@inherit keyword.
|
|
|
36 |
|
|
|
37 |
* If more than one credential set is provided, a default credential set must be specified
|
|
|
38 |
using the @default keyword.
|
|
|
39 |
|
|
|
40 |
* If you only have one credential set, you can set it to the @default keyword.
|
|
|
41 |
|
|
|
42 |
* View the documentation for the CFCredentials::set() method to view usage examples.
|
|
|
43 |
|
|
|
44 |
###################################################################################################*/
|
|
|
45 |
|
|
|
46 |
|
|
|
47 |
/**
|
|
|
48 |
* Create a list of credential sets that can be used with the SDK.
|
|
|
49 |
*/
|
|
|
50 |
CFCredentials::set(array(
|
|
|
51 |
|
|
|
52 |
// Credentials for the development environment.
|
|
|
53 |
'development' => array(
|
|
|
54 |
|
|
|
55 |
// Amazon Web Services Key. Found in the AWS Security Credentials. You can also pass
|
|
|
56 |
// this value as the first parameter to a service constructor.
|
|
|
57 |
'key' => 'development-key',
|
|
|
58 |
|
|
|
59 |
// Amazon Web Services Secret Key. Found in the AWS Security Credentials. You can also
|
|
|
60 |
// pass this value as the second parameter to a service constructor.
|
|
|
61 |
'secret' => 'development-secret',
|
|
|
62 |
|
|
|
63 |
// This option allows you to configure a preferred storage type to use for caching by
|
|
|
64 |
// default. This can be changed later using the set_cache_config() method.
|
|
|
65 |
//
|
|
|
66 |
// Valid values are: `apc`, `xcache`, or a file system path such as `./cache` or
|
|
|
67 |
// `/tmp/cache/`.
|
|
|
68 |
'default_cache_config' => '',
|
|
|
69 |
|
|
|
70 |
// Determines which Cerificate Authority file to use.
|
|
|
71 |
//
|
|
|
72 |
// A value of boolean `false` will use the Certificate Authority file available on the
|
|
|
73 |
// system. A value of boolean `true` will use the Certificate Authority provided by the
|
|
|
74 |
// SDK. Passing a file system path to a Certificate Authority file (chmodded to `0755`)
|
|
|
75 |
// will use that.
|
|
|
76 |
//
|
|
|
77 |
// Leave this set to `false` if you're not sure.
|
|
|
78 |
'certificate_authority' => false
|
|
|
79 |
),
|
|
|
80 |
|
|
|
81 |
// Specify a default credential set to use if there are more than one.
|
|
|
82 |
'@default' => 'development'
|
|
|
83 |
));
|