OAuthLeagueFacade
in package
Table of Contents
Methods
- create() : array<string|int, mixed>
- Create an instance of the PHP League's OAuth2 client for interacting with a given token.
- createProvider() : AbstractProvider
- createProviderOptions() : array<string|int, mixed>
- resolveSingleRef() : array<string|int, mixed>
- Given a $record, determine if it is complete enough for usage. If not, attempt to load the full record. Throw an exception if we don't find it.
Methods
create()
Create an instance of the PHP League's OAuth2 client for interacting with a given token.
public
create(array<string|int, mixed> $tokenRecord) : array<string|int, mixed>
Parameters
- $tokenRecord : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —An array with properties:
- provider: League\OAuth2\Client\Provider\AbstractProvider
- token: League\OAuth2\Client\Token\AccessTokenInterface
createProvider()
public
createProvider(array<string|int, mixed> $clientDef) : AbstractProvider
Parameters
- $clientDef : array<string|int, mixed>
-
The OAuthClient record. This may be a full record, or it may be brief stub with 'id' or 'provider'. (In which case, it will look for exactly one matching client.)
Return values
AbstractProvidercreateProviderOptions()
public
createProviderOptions(array<string|int, mixed> $clientDef) : array<string|int, mixed>
Parameters
- $clientDef : array<string|int, mixed>
-
The OAuthClient record. This may be a full record, or it may be brief stub with 'id' or 'provider'. (In which case, it will look for exactly one matching client.)
Return values
array<string|int, mixed>resolveSingleRef()
Given a $record, determine if it is complete enough for usage. If not, attempt to load the full record. Throw an exception if we don't find it.
protected
resolveSingleRef(string $entity, array<string|int, mixed> $record, array<string|int, mixed> $lookupFields, array<string|int, mixed> $requireFields) : array<string|int, mixed>
Parameters
- $entity : string
-
The of record that we want to load. (APIv4 entity)
- $record : array<string|int, mixed>
-
A complete or partial API record
- $lookupFields : array<string|int, mixed>
-
A list of key fields that can be used to lookup records.
- $requireFields : array<string|int, mixed>
-
A list of data fields that we need to have.