def confirm_scopes(self, refresh_token, scopes, request, *args, **kwargs):
        if not scopes:
            log.debug('Scope omitted for refresh token %r', refresh_token)
            return True
        log.debug('Confirm scopes %r for refresh token %r',
                  scopes, refresh_token)
        tok = self._tokengetter(refresh_token=refresh_token)
        return set(tok.scopes) == set(scopes)
Ensures the requested scope matches the scope originally granted
dataset/ETHPy150Open codalab/codalab-cli/codalab/server/oauth2_provider.py/OAuth2RequestValidator.confirm_scopes