Class: Yauth::FailureApp
- Inherits:
-
Object
- Object
- Yauth::FailureApp
- Defined in:
- lib/yauth/failure_app.rb
Instance Attribute Summary collapse
-
#realm ⇒ Object
Returns the value of attribute realm.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(realm = "Yauth secured area") ⇒ FailureApp
constructor
A new instance of FailureApp.
Constructor Details
#initialize(realm = "Yauth secured area") ⇒ FailureApp
Returns a new instance of FailureApp.
5 6 7 |
# File 'lib/yauth/failure_app.rb', line 5 def initialize(realm="Yauth secured area") self.realm = realm end |
Instance Attribute Details
#realm ⇒ Object
Returns the value of attribute realm.
3 4 5 |
# File 'lib/yauth/failure_app.rb', line 3 def realm @realm end |
Instance Method Details
#call(env) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/yauth/failure_app.rb', line 9 def call(env) [401, { "Content-Type" => "text/plain", "WWW-Authenticate" => %(Basic realm="#{realm}") }, ["#{env['warden'].}\n"]] end |