Gajus\Fuss\AccessToken::debugToken PHP Method

debugToken() private method

Populate the access token information using data retrieved from Facebook.
private debugToken ( ) : null
return null
    private function debugToken()
    {
        if ($this->type != AccessToken::TYPE_APP) {
            $info = $this->getInfo();
            if (!$info['data']['is_valid']) {
                // @todo Distinguish $info['data']['error']['message']
                throw new Exception\AccessTokenException('Invalid Access Token.');
            }
            if (isset($info['data']['issued_at'])) {
                $this->issued_at = $info['data']['issued_at'];
            }
            if (isset($info['data']['expires_at'])) {
                $this->expires_at = $info['data']['expires_at'];
            }
            if (isset($info['data']['scopes'])) {
                $this->scope = $info['data']['scopes'];
            }
        }
    }