Documentation

InsecureCredentials
in package
implements FetchAuthTokenInterface

Provides a set of credentials that will always return an empty access token.

This is useful for APIs which do not require authentication, for local service emulators, and for testing.

Table of Contents

Interfaces

FetchAuthTokenInterface
An interface implemented by objects that can fetch auth tokens.

Properties

$token  : array<string|int, mixed>

Methods

fetchAuthToken()  : array<string|int, mixed>
Fetches the auth token. In this case it returns an empty string.
getCacheKey()  : string|null
Returns the cache key. In this case it returns a null value, disabling caching.
getLastReceivedToken()  : array<string|int, mixed>
Fetches the last received token. In this case, it returns the same empty string auth token.

Properties

Methods

fetchAuthToken()

Fetches the auth token. In this case it returns an empty string.

public fetchAuthToken([callable $httpHandler = null ]) : array<string|int, mixed>
Parameters
$httpHandler : callable = null
Return values
array<string|int, mixed>

A set of auth related metadata, containing the following keys:

  • access_token (string)

getCacheKey()

Returns the cache key. In this case it returns a null value, disabling caching.

public getCacheKey() : string|null
Return values
string|null

getLastReceivedToken()

Fetches the last received token. In this case, it returns the same empty string auth token.

public getLastReceivedToken() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results