module Rack::Reqorder::Monitor::Helpers
Public Instance Methods
authenticate_user!(params)
click to toggle source
# File lib/rack/reqorder/monitor/helpers.rb, line 7 def authenticate_user!(params) authenticate_user(params) ? true : error!('401 Unauthorized', 401) end
Private Instance Methods
authenticate_user(params)
click to toggle source
# File lib/rack/reqorder/monitor/helpers.rb, line 25 def authenticate_user(params) email = params.user.email password = params.user.password correct_email = email == Rack::Reqorder.configuration.auth_email correct_password = password == Rack::Reqorder.configuration.auth_password return (correct_email && correct_password)? true : false end
user_email_password_md5(user: nil)
click to toggle source
# File lib/rack/reqorder/monitor/helpers.rb, line 35 def user_email_password_md5(user: nil) #if user.nil? Digest::MD5.hexdigest( Rack::Reqorder.configuration.auth_email + Rack::Reqorder.configuration.auth_password ) #else #end end