solvebio/contrib/dash/solvebio_auth.py
def logout(self):
        """Revoke the token and remove the cookie."""
        if self._oauth_client_secret:
            try:
                oauth_token = flask.request.cookies[self.TOKEN_COOKIE_NAME]
                # Revoke the token
                requests.post(
                    urljoin(self._api_host, self.OAUTH2_REVOKE_TOKEN_PATH),
                    data={
                        'client_id': self._oauth_client_id,
                        'client_secret': self._oauth_client_secret,
                        'token': oauth_token
                    })
            except:
                pass

        response = flask.redirect('/')
        self.clear_cookies(response)
        return response
def logout(self):
        """Revoke the token and remove the cookie."""
        if self._oauth_client_secret:
            try:
                oauth_token = flask.request.cookies[self.TOKEN_COOKIE_NAME]
                # Revoke the token
                requests.post(
                    urljoin(self._api_host, self.OAUTH2_REVOKE_TOKEN_PATH),
                    data={
                        'client_id': self._oauth_client_id,
                        'client_secret': self._oauth_client_secret,
                        'token': oauth_token
                    })
            except:
                pass

        response = flask.redirect('/')
        self.clear_cookies(response)
        return response
def logout ( self ) : if self . _oauth_client_secret : try : oauth_token = flask . request . cookies [ self . TOKEN_COOKIE_NAME ] # Revoke the token requests . post ( urljoin ( self . _api_host , self . OAUTH2_REVOKE_TOKEN_PATH ) , data = { 'client_id' : self . _oauth_client_id , 'client_secret' : self . _oauth_client_secret , 'token' : oauth_token } ) except : pass response = flask . redirect ( '/' ) self . clear_cookies ( response ) return response
Revoke the token and remove the cookie.
Revoke the token and remove the cookie .