REDROOM
PHP 7.4.33
Path:
Logout
Edit File
Size: 1.73 KB
Close
/home/godevadmin/www/admin/vendor/aws/Aws/CognitoIdentity/CognitoIdentityProvider.php
Text
Base64
<?php namespace Aws\CognitoIdentity; use Aws\Credentials\Credentials; use GuzzleHttp\Promise; class CognitoIdentityProvider { /** @var CognitoIdentityClient */ private $client; /** @var string */ private $identityPoolId; /** @var string|null */ private $accountId; /** @var array */ private $logins; public function __construct( $poolId, array $clientOptions, array $logins = [], $accountId = null ) { $this->identityPoolId = $poolId; $this->logins = $logins; $this->accountId = $accountId; $this->client = new CognitoIdentityClient($clientOptions + [ 'credentials' => false, ]); } public function __invoke() { return Promise\Coroutine::of(function () { $params = $this->logins ? ['Logins' => $this->logins] : []; $getIdParams = $params + ['IdentityPoolId' => $this->identityPoolId]; if ($this->accountId) { $getIdParams['AccountId'] = $this->accountId; } $id = (yield $this->client->getId($getIdParams)); $result = (yield $this->client->getCredentialsForIdentity([ 'IdentityId' => $id['IdentityId'], ] + $params)); yield new Credentials( $result['Credentials']['AccessKeyId'], $result['Credentials']['SecretKey'], $result['Credentials']['SessionToken'], (int) $result['Credentials']['Expiration']->format('U') ); }); } public function updateLogin($key, $value) { $this->logins[$key] = $value; return $this; } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 2
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Exception
DIR
-
drwxrwxr-x
2024-06-18 20:10:06
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
CognitoIdentityClient.php
3.46 KB
lrwxrwxr-x
2024-06-18 20:10:06
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
CognitoIdentityProvider.php
1.73 KB
lrwxrwxr-x
2024-06-18 20:10:06
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).