FacebookController
Class Controller
- Full name: \Zemit\Modules\Oauth2\Controllers\FacebookController
- Parent class: \Zemit\Modules\Oauth2\Controllers\AbstractController
Properties
providerName
public string $providerName
sessionKey
public string $sessionKey
Inherited methods
authorizationUrlAction
Redirect to Authorization Url
public authorizationUrlAction(?string $scope = null): \Phalcon\Http\ResponseInterface
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| $scope | ?string | 
validateState
Validate State
public validateState(?string $state = null): bool
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| $state | ?string | 
getAccessToken
Get Access Token
public getAccessToken(?string $code = null): \League\OAuth2\Client\Token\AccessTokenInterface
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| $code | ?string | 
Throws:
refreshToken
Refresh Token
public refreshToken(?string $refreshToken = null): \League\OAuth2\Client\Token\AccessTokenInterface
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| $refreshToken | ?string | 
Throws:
getToken
Use this to interact with an API on the users behalf
public getToken(\League\OAuth2\Client\Token\AccessTokenInterface $token): string
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| $token | \League\OAuth2\Client\Token\AccessTokenInterface | 
getRefreshToken
Use this to get a new access token if the old one expires
public getRefreshToken(\League\OAuth2\Client\Token\AccessTokenInterface $token): ?string
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| $token | \League\OAuth2\Client\Token\AccessTokenInterface | 
getExpires
Unix timestamp at which the access token expires
public getExpires(\League\OAuth2\Client\Token\AccessTokenInterface $token): ?int
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| $token | \League\OAuth2\Client\Token\AccessTokenInterface | 
getResourceOwner
Requests and returns the resource owner of given access token.
public getResourceOwner(\League\OAuth2\Client\Token\AccessToken $token): \League\OAuth2\Client\Provider\ResourceOwnerInterface
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| $token | \League\OAuth2\Client\Token\AccessToken |