SignBlobInterface
extends
FetchAuthTokenInterface
in
Describes a class which supports signing arbitrary strings.
Table of Contents
Methods
- fetchAuthToken() : array<string|int, mixed>
- Fetches the auth tokens based on the current state.
- getCacheKey() : string
- Obtains a key that can used to cache the results of #fetchAuthToken.
- getClientName() : string
- Returns the current Client Name.
- getLastReceivedToken() : null|array<string|int, mixed>
- Returns an associative array with the token and expiration time.
- signBlob() : string
- Sign a string using the method which is best for a given credentials type.
Methods
fetchAuthToken()
Fetches the auth tokens based on the current state.
public
fetchAuthToken([callable $httpHandler = null ]) : array<string|int, mixed>
Parameters
- $httpHandler : callable = null
-
callback which delivers psr7 request
Return values
array<string|int, mixed> —a hash of auth tokens
getCacheKey()
Obtains a key that can used to cache the results of #fetchAuthToken.
public
getCacheKey() : string
If the value is empty, the auth token is not cached.
Return values
string —a key that may be used to cache the auth token.
getClientName()
Returns the current Client Name.
public
getClientName([callable $httpHandler = null ]) : string
Parameters
- $httpHandler : callable = null
-
callback which delivers psr7 request, if one is required to obtain a client name.
Return values
stringgetLastReceivedToken()
Returns an associative array with the token and expiration time.
public
getLastReceivedToken() : null|array<string|int, mixed>
Return values
null|array<string|int, mixed> —{ The last received access token.
signBlob()
Sign a string using the method which is best for a given credentials type.
public
signBlob(string $stringToSign[, bool $forceOpenssl = false ]) : string
Parameters
- $stringToSign : string
-
The string to sign.
- $forceOpenssl : bool = false
-
Require use of OpenSSL for local signing. Does not apply to signing done using external services. Defaults to
false
.
Return values
string —The resulting signature. Value should be base64-encoded.