OAuthTokenFacade
in package
Table of Contents
Constants
- STORAGE_TYPES = ';^OAuth(Sys|Contact|Session)Token$;'
Methods
- init() : array<string|int, mixed>
- Request and store a token.
- callProtected() : mixed
- Call a protected method.
- findName() : mixed
- implodeScopes() : string|null
- splitScopes() : array<string|int, mixed>|null
Constants
STORAGE_TYPES
public
mixed
STORAGE_TYPES
= ';^OAuth(Sys|Contact|Session)Token$;'
Methods
init()
Request and store a token.
public
init(array<string|int, mixed> $options) : array<string|int, mixed>
Parameters
- $options : array<string|int, mixed>
-
With some mix of the following:
- client: array, the OAuthClient record
- scope: array|string|null, list of scopes to request. if omitted, inherit default from client/provider
- storage: string, default: "OAuthSysToken"
- tag: string|null, a symbolic/freeform identifier for looking-up tokens
- grant_type: string, ex "authorization_code", "client_credentials", "password"
- cred: array, extra credentialing options to pass to the "token" URL (via getAccessToken($tokenOptions)), eg "username", "password", "code"
Tags
Return values
array<string|int, mixed>callProtected()
Call a protected method.
protected
callProtected(mixed $obj, string $method[, array<string|int, mixed> $args = [] ]) : mixed
Parameters
- $obj : mixed
- $method : string
- $args : array<string|int, mixed> = []
findName()
protected
findName(ResourceOwnerInterface $owner) : mixed
Parameters
- $owner : ResourceOwnerInterface
implodeScopes()
protected
implodeScopes(mixed $delim, mixed $scopes) : string|null
Parameters
- $delim : mixed
- $scopes : mixed
Return values
string|nullsplitScopes()
protected
splitScopes(string $delim, string|array<string|int, mixed>|null $scopes) : array<string|int, mixed>|null
Parameters
- $delim : string
- $scopes : string|array<string|int, mixed>|null