public function revokeAccessToken()
    {
        $grantType = $this->getRequest()->request->get('grant_type') ? $this->getRequest()->request->get('grant_type') : 'password';
        $token = $this->getRequest()->request->get('token');
        if (is_null($token)) {
            throw new Exception\InvalidRequestException('token');
        }
        $token_type_hint = $this->getRequest()->request->get('token_type_hint');
        if (! is_null($token_type_hint) && $token_type_hint == 'refresh_token') {
            $authorization = ! empty(Request::header()['authorization'][0]) ? str_replace('Bearer ','', Request::header()['authorization'][0]) : null;
            if (is_null($authorization)) {
                throw new Exception\InvalidRequestException('access_token');
            }
        }
        // Ensure grant type is one that is recognised and is enabled
        if (!in_array($grantType, array_keys($this->grantTypes))) {
            throw new Exception\UnsupportedGrantTypeException($grantType);
        }
        if ($grantType != 'password' && $grantType != 'refresh_token') {
            throw new Exception\UnsupportedRevokeTypeException;
        }
        // Complete the flow

        return $this->getGrantType($grantType)->revokeFlow();
    }