Class: Ext::BasicAuth::Controllers::Unauthenticated
- Inherits:
-
Security::Controllers::Unauthenticated
- Object
- Security::Controllers::Unauthenticated
- Ext::BasicAuth::Controllers::Unauthenticated
- Defined in:
- lib/ext/basic_auth.rb
Overview
Called when an url is not authorized. You can override this is your app.
Class Attribute Summary collapse
-
.realm ⇒ Object
Returns the value of attribute realm.
Instance Method Summary collapse
Methods inherited from Security::Controllers::Unauthenticated
Class Attribute Details
.realm ⇒ Object
Returns the value of attribute realm.
53 54 55 |
# File 'lib/ext/basic_auth.rb', line 53 def realm @realm end |
Instance Method Details
#get ⇒ Object
57 58 59 60 61 62 |
# File 'lib/ext/basic_auth.rb', line 57 def get @status = 401 @headers['Status'] = 'Unauthorized' @headers['WWW-Authenticate'] = "Basic realm=\"#{self.class.realm}\"" super end |