Module: SinatraAuthToken::SinatraHelper
- Defined in:
- lib/sinatra_auth_token.rb
Instance Method Summary collapse
Instance Method Details
#protect!(params, token = nil) ⇒ Object
3 4 5 6 |
# File 'lib/sinatra_auth_token.rb', line 3 def protect!(params, token = nil) return if params["auth_token"] == (token || ::SinatraAuthToken.auth_token) halt 403, "Access Forbidden!\n" end |