Class: Rack::Auth::Basic::Request
Instance Method Summary
collapse
#initialize, #params, #parts, #provided?, #request, #scheme
Instance Method Details
#basic? ⇒ Boolean
43
44
45
|
# File 'lib/rack/auth/basic.rb', line 43
def basic?
:basic == scheme
end
|
#credentials ⇒ Object
47
48
49
|
# File 'lib/rack/auth/basic.rb', line 47
def credentials
@credentials ||= params.unpack("m*").first.split(/:/, 2)
end
|
#username ⇒ Object
51
52
53
|
# File 'lib/rack/auth/basic.rb', line 51
def username
credentials.first
end
|