flask_oauthlib/provider/oauth1.py
def validate_realms(self, client_key, token, request, uri=None,
                        realms=None):
        """Check if the token has permission on those realms."""
        log.debug('Validate realms %r for %r', realms, client_key)
        if request.access_token:
            tok = request.access_token
        else:
            tok = self._tokengetter(client_key=client_key, token=token)
            request.access_token = tok
        if not tok:
            return False
        return set(tok.realms).issuperset(set(realms))
def validate_realms(self, client_key, token, request, uri=None,
                        realms=None):
        log.debug('Validate realms %r for %r', realms, client_key)
        if request.access_token:
            tok = request.access_token
        else:
            tok = self._tokengetter(client_key=client_key, token=token)
            request.access_token = tok
        if not tok:
            return False
        return set(tok.realms).issuperset(set(realms))
def validate_realms ( self , client_key , token , request , uri = None , realms = None ) : log . debug ( 'Validate realms %r for %r' , realms , client_key ) if request . access_token : tok = request . access_token else : tok = self . _tokengetter ( client_key = client_key , token = token ) request . access_token = tok if not tok : return False return set ( tok . realms ) . issuperset ( set ( realms ) )
Check if the token has permission on those realms.
Check if the token has permission on those realms .