From: Magnus Holm <judofyr@gmail.com>
To: rack-devel@googlegroups.com
Subject: Re: How to use Rack::Auth::Digest::MD5
Date: Mon, 19 Oct 2009 13:33:27 +0200 [thread overview]
Message-ID: <391a49da0910190433u24652f90g4bfbca5d9807be8a@mail.gmail.com> (raw)
In-Reply-To: <200910182232.32943.ibc@aliax.net>
What about something like this?
app = lambda do |env|
[200, { 'Content-Type' => "text/html" }, ['Logged in!']]
end
app = Rack::Digest::MD5.new(app) do |username, password|
username == "foo" && password == "bar"
end
run app
//Magnus Holm
On Sun, Oct 18, 2009 at 22:32, Iñaki Baz Castillo <ibc@aliax.net> wrote:
>
> El Viernes, 16 de Octubre de 2009, Iñaki Baz Castillo escribió:
>> Hi, could I get an example of Rack::Auth::Digest::MD5 usage? By reading the
>> doc I get confussed:
>>
>> http://rack.rubyforge.org/doc/Rack/Auth/Digest/MD5.html
>>
>> The only I've found until now is a similar question with no response:
>>
>> http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/313893
>
>
> Any help please? I don't get it working and I don't know exactly what to try
> since there is no documentation or examples.
>
> Thanks.
>
> --
> Iñaki Baz Castillo <ibc@aliax.net>
>
next prev parent reply other threads:[~2009-10-19 11:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-16 18:33 How to use Rack::Auth::Digest::MD5 Iñaki Baz Castillo
2009-10-18 20:32 ` Iñaki Baz Castillo
2009-10-19 11:33 ` Magnus Holm [this message]
2009-10-19 11:54 ` Iñaki Baz Castillo
2009-10-19 12:07 ` Iñaki Baz Castillo
2009-12-18 14:52 ` Genta IHA
2009-12-18 18:09 ` Iñaki Baz Castillo
2009-12-18 18:41 ` Iñaki Baz Castillo
2009-12-18 19:19 ` Iñaki Baz Castillo
2009-12-18 19:21 ` Iñaki Baz Castillo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://groups.google.com/group/rack-devel
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=391a49da0910190433u24652f90g4bfbca5d9807be8a@mail.gmail.com \
--to=rack-devel@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).