blob: a40f57b7f11b19247ffce6990fd83a4c3fa5d6b5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
require 'rack/auth/abstract/request'
require 'rack/auth/digest/params'
require 'rack/auth/digest/nonce'
module Rack
module Auth
module Digest
class Request < Auth::AbstractRequest
def method
@env['REQUEST_METHOD']
end
def digest?
:digest == scheme
end
def correct_uri?
(@env['SCRIPT_NAME'].to_s + @env['PATH_INFO'].to_s) == uri
end
def nonce
@nonce ||= Nonce.parse(params['nonce'])
end
def params
@params ||= Params.parse(parts.last)
end
def method_missing(sym)
if params.has_key? key = sym.to_s
return params[key]
end
super
end
end
end
end
end
|