Class: Tilia::Http::Auth::AbstractAuth
- Inherits:
-
Object
- Object
- Tilia::Http::Auth::AbstractAuth
- Defined in:
- lib/tilia/http/auth/abstract_auth.rb
Overview
HTTP Authentication base class.
This class provides some common functionality for the various base classes.
Instance Attribute Summary collapse
-
#realm ⇒ String
readonly
Returns the HTTP realm.
Instance Method Summary collapse
-
#initialize(realm = 'TiliaTooth', request, response) ⇒ void
constructor
Creates the object.
-
#require_login ⇒ void
This method sends the needed HTTP header and statuscode (401) to force the user to login.
Constructor Details
#initialize(realm = 'TiliaTooth', request, response) ⇒ void
Creates the object
31 32 33 34 35 |
# File 'lib/tilia/http/auth/abstract_auth.rb', line 31 def initialize(realm = 'TiliaTooth', request, response) @realm = realm @request = request @response = response end |
Instance Attribute Details
#realm ⇒ String
Returns the HTTP realm
13 14 15 |
# File 'lib/tilia/http/auth/abstract_auth.rb', line 13 def realm @realm end |
Instance Method Details
#require_login ⇒ void
This method returns an undefined value.
This method sends the needed HTTP header and statuscode (401) to force the user to login.
41 42 |
# File 'lib/tilia/http/auth/abstract_auth.rb', line 41 def require_login end |