code: def extract_scopes(self, request):
          
          payload = self.extract_payload(request)
          if not payload:
              return None
  
          scopes_attribute = self.config.scopes_name()
          return payload.get(scopes_attribute, None)
docs: Extract scopes from a request object.