From nobody Thu Apr 25 15:13:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=patchew-devel-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1557755853; cv=none; d=zoho.com; s=zohoarc; b=FJ7Opv5jq4OTyZlqATnOwPAtXAjunenw90BbFr8o5stz4NqkpiR/aOEI3VznJd6TCX7+Kb4dH99q+LVEAWiuiPtMEgaMPYJYcqeOmxQ+QwE3GmRG9NQLBd2tAc8PdsB1Fgy6m4eHJsRcjzACJs99GqzEOZN6b+Q8+qyV4XQ6vVw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557755853; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=LbRii/BO3klMWg3C4uEYzB/Qvcr7AHGSOfsu35wZLas=; b=HClK6SHdNxAwWc9vOgZlJeyQFrlo8sDdcHf8eLCsdUI6WhFkTdFjpyRtSk19HLiLiYssmIw3bjNbri0dsIYALURIxjTQCC8OTv60otpzC2tj1OS/SICItALcaqhFP99tGDB+WYYgQpyNnAFbClRn71RQDiZqJ3gkl0zSB5u571c= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1557755853767198.75178698325192; Mon, 13 May 2019 06:57:33 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F32532D7EA; Mon, 13 May 2019 13:57:31 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E828E6928F; Mon, 13 May 2019 13:57:31 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id DE7EF18089D3; Mon, 13 May 2019 13:57:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x4DDrHTE025279 for ; Mon, 13 May 2019 09:53:17 -0400 Received: by smtp.corp.redhat.com (Postfix) id E6FFF69292; Mon, 13 May 2019 13:53:17 +0000 (UTC) Received: from mx1.redhat.com (ext-mx16.extmail.prod.ext.phx2.redhat.com [10.5.110.45]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E169C6928F for ; Mon, 13 May 2019 13:53:15 +0000 (UTC) Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 558D23087945 for ; Mon, 13 May 2019 13:53:02 +0000 (UTC) Received: by mail-wr1-f51.google.com with SMTP id r7so14749232wrr.13 for ; Mon, 13 May 2019 06:53:02 -0700 (PDT) Received: from localhost.localdomain ([212.140.138.203]) by smtp.gmail.com with ESMTPSA id 34sm5456970wre.32.2019.05.13.06.52.59 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 13 May 2019 06:52:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Jy3GnmwPf/DCC1mUkdOM0/5wsTPBgAinStFY0YUop3g=; b=S6wb9eoeu2rS6RiZ7jNU8KvnJAgvZtZs7eRPjKmuHIuYDd1w0UhHxBIgJ10XUA03v+ UhGo+n+s/bmeuIIgGTNrAAvFWqhJSgmsqBASeO66qguIbdOk4qwXYGbL9HejBSVM5K62 LuZUa+CBtvm9Xivwo9cb6pZoJflaWjoR3+a/580TgTXU0j8JzLSTSuMGsvXvpBLLGbrQ zrX7t3M/IAut1WWlcOOwoGF0xZ2KZ1Bcri01uvBWewLvtqtg+Xlysu35a7w3EiFIEbJv r0qsFX0P/hVc4B2LQi5n7TXCAqJxA2NRP/hsrt7JQpHFTAQB+nVCTcrfvqs4d6KnavRZ aTFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Jy3GnmwPf/DCC1mUkdOM0/5wsTPBgAinStFY0YUop3g=; b=PnX/rYoEIn/dvJqx6efaCXmXop17Y3Eh95Fmw6cMfz1KjOwh+dFcIxT8EJzRHGlQtF 7dQgf7bpj4WFU3QvvkIqzrV0aUuy+5dsFTMfVAAnW3WkB0ZCNP5uIYO46jn+vpdNRryk N4VDqxD/84a0HSbwQrp3Tp37KFJGxP1AzkcS+mQht/YkIZ2+LeP1e5crTUW8BgW0irwp atpQmikKQ6xOgmGhJOC0clSpU+ipTFYfdrl+TSVElI109Bz6XRKCruFLvgAFKL0sUhUT /RcFtocJabjsIxPvOegqy+fdiFNKvusrS3kyyGsaAGDTZrHscwUrfKwwtvyOOF5jRlXd PldQ== X-Gm-Message-State: APjAAAUJYxYqfPKI8TmvbarnvrhHBqlj5iWimlnebI0PwEdmDlTaheT7 GkPpbRC0/Ia8WVlxHgGZnlVvzFWIlfw= X-Google-Smtp-Source: APXvYqx7FO6CjWJiOZFVTfV/BJAbSACdvrkBen4cd40D+AgNxKk3vvr0S0VSNZejNv0cMALmyL6rKw== X-Received: by 2002:a5d:6b46:: with SMTP id x6mr814130wrw.313.1557755580742; Mon, 13 May 2019 06:53:00 -0700 (PDT) From: Paolo Bonzini To: patchew-devel@redhat.com Date: Mon, 13 May 2019 15:52:55 +0200 Message-Id: <20190513135256.15125-3-pbonzini@redhat.com> In-Reply-To: <20190513135256.15125-1-pbonzini@redhat.com> References: <20190513135256.15125-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Mon, 13 May 2019 13:53:02 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Mon, 13 May 2019 13:53:02 +0000 (UTC) for IP:'209.85.221.51' DOMAIN:'mail-wr1-f51.google.com' HELO:'mail-wr1-f51.google.com' FROM:'paolo.bonzini@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.002 (DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, RCVD_IN_SBL_CSS, SPF_PASS) 209.85.221.51 mail-wr1-f51.google.com 209.85.221.51 mail-wr1-f51.google.com X-RedHat-Possible-Forgery: Paolo Bonzini X-Scanned-By: MIMEDefang 2.84 on 10.5.110.45 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 2/3] rest: enable token-based authentication X-BeenThere: patchew-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Patchew development and discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 13 May 2019 13:57:32 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" --- patchew/settings.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/patchew/settings.py b/patchew/settings.py index 11a79b4..dead744 100644 --- a/patchew/settings.py +++ b/patchew/settings.py @@ -47,6 +47,7 @@ INSTALLED_APPS =3D [ 'django.contrib.messages', 'django.contrib.staticfiles', 'rest_framework', + 'rest_framework.authtoken', ] =20 MIDDLEWARE =3D [ @@ -62,6 +63,10 @@ MIDDLEWARE =3D [ ] =20 REST_FRAMEWORK =3D { + 'DEFAULT_AUTHENTICATION_CLASSES': ( + 'rest_framework.authentication.TokenAuthentication', + 'rest_framework.authentication.SessionAuthentication', + ), 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagin= ation', 'URL_FIELD_NAME': 'resource_uri', 'PAGE_SIZE': 50, --=20 2.21.0 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel