end
def api_call_timeout
- Timeout::timeout(APP_CONFIG['api_timeout'], OSM::APITimeoutError) do
+ SystemTimer.timeout_after(APP_CONFIG['api_timeout']) do
yield
end
+ rescue Timeout::Error
+ raise OSM::APITimeoutError
end
##
expire_fragment(Regexp.new(Regexp.escape(path) + "\\..*"))
end
+ ##
+ # is the requestor logged in?
+ def logged_in?
+ !@user.nil?
+ end
+
private
# extract authorisation credentials from headers, returns user = nil if none