src/Widop/Twitter/OAuth/OAuth.php
public function invalidateBearerToken(BearerToken $token)
    {
        $request = $this->createRequest('/oauth2/invalidate_token');
        $request->setPostParameter('access_token', $token->getValue());
        $this->signRequest($request, new BasicToken());

        $response = $this->sendRequest($request);

        if ($token->getValue() !== $response->getData('access_token')) {
            throw new OAuthException('An error occured when invalidating the bearer token.', $response);
        }
    }
public function invalidateBearerToken(BearerToken $token)
    {
        $request = $this->createRequest('/oauth2/invalidate_token');
        $request->setPostParameter('access_token', $token->getValue());
        $this->signRequest($request, new BasicToken());

        $response = $this->sendRequest($request);

        if ($token->getValue() !== $response->getData('access_token')) {
            throw new OAuthException('An error occured when invalidating the bearer token.', $response);
        }
    }
public function invalidateBearerToken ( BearerToken $ token ) { $ request = $ this -> createRequest ( '/oauth2/invalidate_token' ) ; $ request -> setPostParameter ( 'access_token' , $ token -> getValue ( ) ) ; $ this -> signRequest ( $ request , new BasicToken ( ) ) ; $ response = $ this -> sendRequest ( $ request ) ; if ( $ token -> getValue ( ) !== $ response -> getData ( 'access_token' ) ) { throw new OAuthException ( 'An error occured when invalidating the bearer token.' , $ response ) ; } }
Invalidates the bearer token.

@param \Widop\Twitter\OAuth\BearerToken $token The bearer token.

@throws \RuntimeException If the token was not invalidated.
Invalidates the bearer token .