class BearerToken

BearerToken is a Guzzle handler to add the necessary headers to authenticate against the Contentful APIs.

Methods

__construct(string $token)

BearerToken constructor.

__invoke(callable $handler)

Makes this class callable. Runs the necessary set up to add the Authorization header.

Details

at line 28
__construct(string $token)

BearerToken constructor.

Parameters

string $token Access token for the API

at line 40
Closure __invoke(callable $handler)

Makes this class callable. Runs the necessary set up to add the Authorization header.

Parameters

callable $handler

Return Value

Closure