HumHub Documentation (unofficial)

InstanceProvider
in package
implements CredentialProvider

FinalYes

Provides Credentials from the running EC2 metadata server using the IMDSv1 and IMDSv2.

Tags
see
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-retrieval.html
author

Jérémy Derussé jeremy@derusse.com

Table of Contents

Interfaces

CredentialProvider
Interface for providing Credential.

Constants

METADATA_ENDPOINT  = 'http://169.254.169.254/latest/meta-data/iam/security-credentials'
TOKEN_ENDPOINT  = 'http://169.254.169.254/latest/api/token'

Properties

$httpClient  : HttpClientInterface
$logger  : LoggerInterface
$timeout  : float
$tokenTtl  : int

Methods

__construct()  : mixed
getCredentials()  : Credentials|null
Return a Credential when possible. Return null otherwise.
getToken()  : string|null
toArray()  : array<string, mixed>
Copy of Symfony\Component\HttpClient\Response::toArray without assertion on Content-Type header.

Constants

METADATA_ENDPOINT

private mixed METADATA_ENDPOINT = 'http://169.254.169.254/latest/meta-data/iam/security-credentials'

TOKEN_ENDPOINT

private mixed TOKEN_ENDPOINT = 'http://169.254.169.254/latest/api/token'

Properties

Methods

toArray()

Copy of Symfony\Component\HttpClient\Response::toArray without assertion on Content-Type header.

private toArray(ResponseInterface $response) : array<string, mixed>
Parameters
$response : ResponseInterface
Return values
array<string, mixed>

        
On this page

Search results