public function unsetRefreshToken($refresh_token)
    {
        $refreshToken = $this->em->getRepository('OAuth2ServerBundle:RefreshToken')->find($refresh_token);
        $this->em->remove($refreshToken);
        $this->em->flush();
    }
public function unsetRefreshToken($refresh_token)
    {
        $refreshToken = $this->em->getRepository('OAuth2ServerBundle:RefreshToken')->find($refresh_token);
        $this->em->remove($refreshToken);
        $this->em->flush();
    }
public function unsetRefreshToken ( $ refresh_token ) { $ refreshToken = $ this -> em -> getRepository ( 'OAuth2ServerBundle:RefreshToken' ) -> find ( $ refresh_token ) ; $ this -> em -> remove ( $ refreshToken ) ; $ this -> em -> flush ( ) ; }
Expire a used refresh token.

This is not explicitly required in the spec, but is almost implied.
After granting a new refresh token, the old one is no longer useful and
so should be forcibly expired in the data store so it can't be used again.

If storage fails for some reason, we're not currently checking for
any sort of success/failure, so you should bail out of the script
and provide a descriptive fail message.

@param $refresh_token
Refresh token to be expirse.

@ingroup oauth2_section_6
Expire a used refresh token .