Total Complexity | 5 |
Total Lines | 66 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | class StsCredential implements CredentialsInterface |
||
14 | { |
||
15 | |||
16 | /** |
||
17 | * @var string |
||
18 | */ |
||
19 | private $accessKeyId; |
||
20 | |||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | private $accessKeySecret; |
||
25 | |||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | private $securityToken; |
||
30 | |||
31 | /** |
||
32 | * StsCredential constructor. |
||
33 | * |
||
34 | * @param string $accessKeyId Access key ID |
||
35 | * @param string $accessKeySecret Access Key Secret |
||
36 | * @param string $securityToken Security Token |
||
37 | * |
||
38 | * @throws ClientException |
||
39 | */ |
||
40 | 21 | public function __construct($accessKeyId, $accessKeySecret, $securityToken = '') |
|
41 | { |
||
42 | 21 | CredentialFilter::AccessKey($accessKeyId, $accessKeySecret); |
|
43 | |||
44 | 13 | $this->accessKeyId = $accessKeyId; |
|
45 | 13 | $this->accessKeySecret = $accessKeySecret; |
|
46 | 13 | $this->securityToken = $securityToken; |
|
47 | 13 | } |
|
48 | |||
49 | /** |
||
50 | * @return string |
||
51 | */ |
||
52 | 5 | public function getAccessKeyId() |
|
53 | { |
||
54 | 5 | return $this->accessKeyId; |
|
55 | } |
||
56 | |||
57 | /** |
||
58 | * @return string |
||
59 | */ |
||
60 | 6 | public function getAccessKeySecret() |
|
61 | { |
||
62 | 6 | return $this->accessKeySecret; |
|
63 | } |
||
64 | |||
65 | /** |
||
66 | * @return string |
||
67 | */ |
||
68 | 4 | public function getSecurityToken() |
|
69 | { |
||
70 | 4 | return $this->securityToken; |
|
71 | } |
||
72 | |||
73 | /** |
||
74 | * @return string |
||
75 | */ |
||
76 | 4 | public function __toString() |
|
79 | } |
||
80 | } |
||
81 |