Module: AuthHMAC::Rails::ControllerFilter::InstanceMethods
- Defined in:
- lib/auth-hmac.rb
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#hmac_authenticated? ⇒ Boolean
276 277 278 |
# File 'lib/auth-hmac.rb', line 276 def hmac_authenticated? self.class.authhmac.nil? ? true : self.class.authhmac.authenticated?(request) end |
#hmac_login_required ⇒ Object
269 270 271 272 273 274 |
# File 'lib/auth-hmac.rb', line 269 def hmac_login_required unless hmac_authenticated? response.headers['WWW-Authenticate'] = 'AuthHMAC' render :text => self.class., :status => :unauthorized end end |