[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Digest Authentication in Rack

Bryan Richardson

9/5/2008 2:33:00 AM

Hello all,

Has anyone been able to figure out how to use the digest authentication
provided in Rack? I tried searching the web and tried reading Rack's
documentation, but still haven't had any success. The
Rack::Auth::Digest::MD5 class has the following documentation:

# Rack::Auth::Digest::MD5 implements the MD5 algorithm version of
# HTTP Digest Authentication, as per RFC 2617.
#
# Initialize with the [Rack] application that you want protecting,
# and a block that looks up a plaintext password for a given username.
#
# +opaque+ needs to be set to a constant base64/hexadecimal string.

So, I tried the following:

require 'rubygems'
require 'sinatra'

get '/admin' do
Rack::Auth::Digest::MD5.new(self) do |u,p|
u == 'foo' && p == 'bar'
end
"Authorized!"
end

However, I was never asked for my credentials...

So, has anyone had the chance to get this working?

--
Thanks!
Bryan
--
Posted via http://www.ruby-....

15 Answers

Daryl

10/18/2011 5:58:00 AM

0

On 10/17/2011 11:36 PM, David E. Powell wrote:
> On Mon, 17 Oct 2011 19:18:38 -0700 (PDT), David E. Powell wrote:
>
>> ...and one of the key steps to getting equal rights for Black
>> Americans was the integration of the Armed Services, and the
>> recognition of Black Americans' military service.
>
> Truth though, I hate the nigger breed...and always will.

Say what?



--
http://tvmoviesf...
for free movies and Nostalgic TV. Tons of Military shows and
programs.

Eunometic

10/18/2011 6:23:00 AM

0

On Oct 18, 4:57 pm, Daryl <dh...@nospami70west3.com> wrote:
> On 10/17/2011 11:36 PM, David E. Powell wrote:
>
> > On Mon, 17 Oct 2011 19:18:38 -0700 (PDT), David E. Powell wrote:
>
> >> ...and one of the key steps to getting equal rights for Black
> >> Americans was the integration of the Armed Services, and the
> >> recognition of Black Americans' military service.
>
> > Truth though, I hate the nigger breed...and always will.
>
> Say what?

Sent from two different IP adresses, one VPN. Someone impersonating
the affable Mr Powell.

David E. Powell

10/18/2011 6:39:00 AM

0

On Mon, 17 Oct 2011 23:57:38 -0600, Daryl wrote:

> On 10/17/2011 11:36 PM, David E. Powell wrote:
>> On Mon, 17 Oct 2011 19:18:38 -0700 (PDT), David E. Powell wrote:
>>
>>> ...and one of the key steps to getting equal rights for Black
>>> Americans was the integration of the Armed Services, and the
>>> recognition of Black Americans' military service.
>>
>> Truth though, I hate the nigger breed...and always will.
>
> Say what?

Which part of "hate" or "breed' did you miss? In order to get the
breed their mongrel civil rights, we had to accept them into our Armed
Services. Why? Democrats wanted Southern state bloc votes in the '60s.

They also make good fodder, better the breed than us..

Tom

10/18/2011 7:05:00 AM

0

On Mon, 17 Oct 2011 23:22:57 -0700 (PDT), Eunometic wrote:

> On Oct 18, 4:57?pm, Daryl <dh...@nospami70west3.com> wrote:
>> On 10/17/2011 11:36 PM, David E. Powell wrote:
>>
>>> On Mon, 17 Oct 2011 19:18:38 -0700 (PDT), David E. Powell wrote:
>>
>>>> ...and one of the key steps to getting equal rights for Black
>>>> Americans was the integration of the Armed Services, and the
>>>> recognition of Black Americans' military service.
>>
>>> Truth though, I hate the nigger breed...and always will.
>>
>> Say what?
>
> Sent from two different IP adresses,

Good catch! What are they?

> one VPN.

Wow? Proof?
--
"NO GUM !!" she screamed violently.

H?gar

10/18/2011 7:07:00 AM

0

On Tue, 18 Oct 2011 03:04:35 -0400, Tom wrote:

> On Mon, 17 Oct 2011 23:22:57 -0700 (PDT), Eunometic wrote:
>
>> On Oct 18, 4:57?pm, Daryl <dh...@nospami70west3.com> wrote:
>>> On 10/17/2011 11:36 PM, David E. Powell wrote:
>>>
>>>> On Mon, 17 Oct 2011 19:18:38 -0700 (PDT), David E. Powell wrote:
>>>
>>>>> ...and one of the key steps to getting equal rights for Black
>>>>> Americans was the integration of the Armed Services, and the
>>>>> recognition of Black Americans' military service.
>>>
>>>> Truth though, I hate the nigger breed...and always will.
>>>
>>> Say what?
>>
>> Sent from two different IP adresses,
>
> Good catch! What are they?
>
>> one VPN.
>
> Wow? Proof?

Easy. Just look at the headers at the head.

Tom

10/18/2011 7:13:00 AM

0

On Tue, 18 Oct 2011 03:06:35 -0400, H?gar wrote:

> On Tue, 18 Oct 2011 03:04:35 -0400, Tom wrote:
>
>> On Mon, 17 Oct 2011 23:22:57 -0700 (PDT), Eunometic wrote:
>>
>>> On Oct 18, 4:57?pm, Daryl <dh...@nospami70west3.com> wrote:
>>>> On 10/17/2011 11:36 PM, David E. Powell wrote:
>>>>
>>>>> On Mon, 17 Oct 2011 19:18:38 -0700 (PDT), David E. Powell wrote:
>>>>
>>>>>> ...and one of the key steps to getting equal rights for Black
>>>>>> Americans was the integration of the Armed Services, and the
>>>>>> recognition of Black Americans' military service.
>>>>
>>>>> Truth though, I hate the nigger breed...and always will.
>>>>
>>>> Say what?
>>>
>>> Sent from two different IP adresses,
>>
>> Good catch! What are they?
>>
>>> one VPN.
>>
>> Wow? Proof?
>
> Easy. Just look at the headers at the head.

WTF? "Headers at the head"? *ROFL* OK, assclown, post them.
--
"NO GUM !!" she screamed violently.

H?gar

10/18/2011 7:15:00 AM

0

On Tue, 18 Oct 2011 03:13:15 -0400, Tom wrote:

> On Tue, 18 Oct 2011 03:06:35 -0400, H?gar wrote:
>
>> On Tue, 18 Oct 2011 03:04:35 -0400, Tom wrote:
>>
>>> On Mon, 17 Oct 2011 23:22:57 -0700 (PDT), Eunometic wrote:
>>>
>>>> On Oct 18, 4:57?pm, Daryl <dh...@nospami70west3.com> wrote:
>>>>> On 10/17/2011 11:36 PM, David E. Powell wrote:
>>>>>
>>>>>> On Mon, 17 Oct 2011 19:18:38 -0700 (PDT), David E. Powell wrote:
>>>>>
>>>>>>> ...and one of the key steps to getting equal rights for Black
>>>>>>> Americans was the integration of the Armed Services, and the
>>>>>>> recognition of Black Americans' military service.
>>>>>
>>>>>> Truth though, I hate the nigger breed...and always will.
>>>>>
>>>>> Say what?
>>>>
>>>> Sent from two different IP adresses,
>>>
>>> Good catch! What are they?
>>>
>>>> one VPN.
>>>
>>> Wow? Proof?
>>
>> Easy. Just look at the headers at the head.
>
> WTF? "Headers at the head"? *ROFL* OK, assclown, post them.

No. You. Go ahead. You.

Daryl

10/18/2011 9:00:00 AM

0

On 10/18/2011 12:22 AM, Eunometic wrote:
> On Oct 18, 4:57 pm, Daryl<dh...@nospami70west3.com> wrote:
>> On 10/17/2011 11:36 PM, David E. Powell wrote:
>>
>>> On Mon, 17 Oct 2011 19:18:38 -0700 (PDT), David E. Powell wrote:
>>
>>>> ...and one of the key steps to getting equal rights for Black
>>>> Americans was the integration of the Armed Services, and the
>>>> recognition of Black Americans' military service.
>>
>>> Truth though, I hate the nigger breed...and always will.
>>
>> Say what?
>
> Sent from two different IP adresses, one VPN. Someone impersonating
> the affable Mr Powell.

Had to be that. Dave would never post such a thing.

--
http://tvmoviesf...
for free movies and Nostalgic TV. Tons of Military shows and
programs.

Pepperoni

10/18/2011 9:49:00 AM

0

Tom <exoticmarques@Use-Author-Supplied-Address.invalid> wrote in
news:201110180713.UTC.j7j8ub$nhm$1@tioat.net:

>>>> one VPN.
>>>
>>> Wow? Proof?
>>
>> Easy. Just look at the headers at the head.
>
> WTF? "Headers at the head"? *ROFL* OK, assclown, post them.
> --
>

Most idiots can find full headers

Yours look like the following:


Path: news4.newsguy.com!extra.newsguy.com!npeersf02.iad.highwinds-
media.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-
me.highwinds-media.com!news.glorb.com!feeder.erje.net!news.mixmin.net!
tioat.net!not-for-mail
From: Tom <exoticmarques@Use-Author-Supplied-Address.invalid>
Newsgroups:
soc.veterans,rec.aviation.military,sci.military.naval,alt.war.vietnam,us
..military.army
Subject: Re: MLK: a monument of peace among monuments of war
Date: Tue, 18 Oct 2011 03:13:15 -0400
Lines: 32
Message-ID: <201110180713.UTC.j7j8ub$nhm$1@tioat.net>
References: <SsudnbBDZc1NYQfTnZ2dnUVZ_gednZ2d@supernews.com> <10a208dd-
8cdc-4bcb-b487-64ff2d01978f@v28g2000vby.googlegroups.com>
<4e9d105d@news.x-privat.org> <j7j4gq$g71$1@dont-email.me> <c8d26912-
bb66-42c9-8cbd-6ece62ae73ac@42g2000prp.googlegroups.com>
<4e9d250a@news.x-privat.org> <4e9d2582$1@news.x-privat.org>
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 18 Oct 2011 07:13:16 +0000 (UTC)
Injection-Info: tioat.net; posting-
host="9d53716be987ab0acdfc7a6a353c68e3"; mail-complaints-
to="news_AT_tioat_DOT_net"
Author-Supplied-Address: Tom <exoticmarques_AT_gmail_DOT_com>
Xref: news4.newsguy.com soc.veterans:439617
rec.aviation.military:360801 sci.military.naval:686939
alt.war.vietnam:397469 us.military.army:548891
X-Received-Date: Tue, 18 Oct 2011 07:13:17 UTC (s05-b10.iad)
X-Antivirus: avast! (VPS 111017-1, 10/17/2011), Inbound message
X-Antivirus-Status: Clean

Tom

10/18/2011 11:34:00 PM

0

On 18 Oct 2011 09:48:52 GMT, Pepperoni wrote:

> Tom <exoticmarques@Use-Author-Supplied-Address.invalid> wrote in
> news:201110180713.UTC.j7j8ub$nhm$1@tioat.net:
>
>>>>> one VPN.
>>>>
>>>> Wow? Proof?
>>>
>>> Easy. Just look at the headers at the head.
>>
>> WTF? "Headers at the head"? *ROFL* OK, assclown, post them.
>> --
>>
>
> Most idiots can find full headers
>
> Yours look like the following:
>
*snipped inane bullshit*

No shit? Really? I would never fucking know. Now what do they look
like?

Did you find Hagar's "VPN" in there shit4brains? No?

*LOL*

Two big clowny shoed, red rubber nosed assclowns you are.
--
"NO GUM !!" she screamed violently.