def refresh_access_token(self, client_id, client_secret, refresh_token):

        now = datetime.datetime.now()
        credentials = get_client_credentials(client_id)
        old_token = self.db.tokens.find_one({'_id': refresh_token,
                                             'client_id': client_id})

        if old_token and expired_refresh_token(old_token, now) and credentials['client_secret'] == client_secret:
            return self.add_access_token(client_id,
                                         old_token['user_id'],
                                         self.config[self.CONFIG_ACCESS_LIFETIME],
                                         old_token['refresh_token'],
                                         self.config[self.CONFIG_REFRESH_LIFETIME],
                                         old_token['expires_refresh'],
                                         old_token['the_scope'])
        return (False,) * 3
Updates an access token, given the refresh token.
dataset/ETHPy150Open joaoqalves/web2py-oauth2/modules/oauth/storage/__init__.py/MongoStorage.refresh_access_token