Class: Rack::Authentication::Adapters::Basic
- Inherits:
-
Base
- Object
- Base
- Rack::Authentication::Adapters::Basic
show all
- Defined in:
- lib/rack/authentication/adapters/basic.rb
Instance Attribute Summary
Attributes inherited from Base
#credentials, #env, #type
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#authorized? ⇒ Boolean
7
8
9
10
11
|
# File 'lib/rack/authentication/adapters/basic.rb', line 7
def authorized?
username, password = credentials
return false if username.nil? || password.nil?
ENV["#{username.upcase}_PASSWORD"] == password
end
|
#good? ⇒ Boolean
3
4
5
|
# File 'lib/rack/authentication/adapters/basic.rb', line 3
def good?
"Basic" == type
end
|