code: def proxy_callback_allowed(service, pgturl):
      
      if hasattr(settings, 'MAMA_CAS_SERVICES'):
          return _is_allowed('proxy_callback_allowed', service, pgturl)
      return _is_valid_service_url(service)
docs: Check if a given proxy callback is allowed for the given service identifier.