From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.140.199.13 with SMTP id w13cs81794rvf; Mon, 19 Oct 2009 04:54:16 -0700 (PDT) Received-SPF: pass (google.com: domain of grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com designates 10.150.17.3 as permitted sender) client-ip=10.150.17.3; Authentication-Results: mr.google.com; spf=pass (google.com: domain of grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com designates 10.150.17.3 as permitted sender) smtp.mail=grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com; dkim=pass header.i=grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com Received: from mr.google.com ([10.150.17.3]) by 10.150.17.3 with SMTP id 3mr3559767ybq.33.1255953255481 (num_hops = 1); Mon, 19 Oct 2009 04:54:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:received:x-sender:x-apparently-to :received:received:received:received-spf:received:received:received :from:to:subject:date:user-agent:references:in-reply-to:mime-version :content-type:content-transfer-encoding:message-id:reply-to:sender :precedence:x-google-loop:mailing-list:list-id:list-post:list-help :list-unsubscribe:x-beenthere-env:x-beenthere; bh=ipYTTePxcPEvgHxpHgLR7He/Y2qO9RtBp3KXIhzRxyY=; b=LIr8Saod3CQx1W2JwOq//1aMLHRZrTs5sUaW33V0ry8iG/ZPxfygEzmwsjwl8JNjf8 eWSh5pWgEaKdgfH0hb3NXM4nTUQu6oD2JNela+P4VU1NbxEt5P5iSdIFit0qCl1s084L fwGK/RnN0epXd5Vr9POsTAg4D6L9q0DMz528s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-sender:x-apparently-to:received-spf:authentication-results:from :to:subject:date:user-agent:references:in-reply-to:mime-version :content-type:content-transfer-encoding:message-id:reply-to:sender :precedence:x-google-loop:mailing-list:list-id:list-post:list-help :list-unsubscribe:x-beenthere-env:x-beenthere; b=TI7sVl5ljGvCR2mzj+41IJ42c9FVQgQyP0XWOKMjuxkMncF0v/RO7SCER3TA7q+bN1 BmSU3ehVTYEkPOgXMnsC19mNRanPD/UI8tTA/84XmM1HZrtev9dyNlRcXP5VNCXoF/1t SGt1RcvaDtojvSKAkvVGhg5uC+W4gqUI69f40= Received: by 10.150.17.3 with SMTP id 3mr352183ybq.33.1255953255431; Mon, 19 Oct 2009 04:54:15 -0700 (PDT) Received: by 10.176.149.32 with SMTP id w32gr1704yqd.0; Mon, 19 Oct 2009 04:54:06 -0700 (PDT) X-Sender: ibc@aliax.net X-Apparently-To: rack-devel@googlegroups.com Received: by 10.211.131.9 with SMTP id i9mr346566ebn.12.1255953244531; Mon, 19 Oct 2009 04:54:04 -0700 (PDT) Received: by 10.211.131.9 with SMTP id i9mr346565ebn.12.1255953244509; Mon, 19 Oct 2009 04:54:04 -0700 (PDT) Return-Path: Received: from mail-ew0-f209.google.com (mail-ew0-f209.google.com [209.85.219.209]) by gmr-mx.google.com with ESMTP id 14si860983ewy.5.2009.10.19.04.54.04; Mon, 19 Oct 2009 04:54:04 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.219.209 is neither permitted nor denied by best guess record for domain of ibc@aliax.net) client-ip=209.85.219.209; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 209.85.219.209 is neither permitted nor denied by best guess record for domain of ibc@aliax.net) smtp.mail=ibc@aliax.net Received: by mail-ew0-f209.google.com with SMTP id 5so807647ewy.36 for ; Mon, 19 Oct 2009 04:54:04 -0700 (PDT) Received: by 10.211.142.11 with SMTP id u11mr5498144ebn.8.1255953244295; Mon, 19 Oct 2009 04:54:04 -0700 (PDT) Return-Path: Received: from ibc-laptop.localnet (30.pool85-58-8.dynamic.orange.es [85.58.8.30]) by mx.google.com with ESMTPS id 10sm1996622eyz.19.2009.10.19.04.54.03 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 19 Oct 2009 04:54:03 -0700 (PDT) From: =?utf-8?q?I=C3=B1aki_Baz_Castillo?= To: rack-devel@googlegroups.com Subject: Re: How to use Rack::Auth::Digest::MD5 Date: Mon, 19 Oct 2009 13:54:00 +0200 User-Agent: KMail/1.12.2 (Linux/2.6.28-15-generic; KDE/4.3.2; x86_64; ; ) References: <200910162033.57584.ibc@aliax.net> <200910182232.32943.ibc@aliax.net> <391a49da0910190433u24652f90g4bfbca5d9807be8a@mail.gmail.com> In-Reply-To: <391a49da0910190433u24652f90g4bfbca5d9807be8a@mail.gmail.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <200910191354.00488.ibc@aliax.net> Reply-To: rack-devel@googlegroups.com Sender: rack-devel@googlegroups.com Precedence: bulk X-Google-Loop: groups Mailing-List: list rack-devel@googlegroups.com; contact rack-devel+owner@googlegroups.com List-Id: List-Post: List-Help: List-Unsubscribe: , X-BeenThere-Env: rack-devel@googlegroups.com X-BeenThere: rack-devel@googlegroups.com El Lunes, 19 de Octubre de 2009, Magnus Holm escribi=C3=B3: > What about something like this? >=20 > app =3D lambda do |env| > [200, { 'Content-Type' =3D> "text/html" }, ['Logged in!']] > end >=20 > app =3D Rack::Digest::MD5.new(app) do |username, password| > username =3D=3D "foo" && password =3D=3D "bar" > end >=20 > run app Thanks, but what about if I just want to ask for authentication depending o= n=20 the URL? =46or example: I require authentication if the URL is: http://domain.org/service1/users/alice@domain.org/index.xml But I don't require authentication if the URL is: http://domain.org/service1/global/index.xml Also, there are cases in which I require Digest authentication if method is= =20 PUT but not for GET. Is it possible? Thanks a lot. =2D-=20 I=C3=B1aki Baz Castillo